Files
unkin-agent 460dc2c5c8
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
Install plugins from a branch
Many upstream plugins publish no tags at all, so a tag-only installer cannot
manage them.

- Add a branch spec field, mutually exclusive with tag and validated the same way
- Build archive/refs/heads/<branch> URLs for branch specs
- Refetch a branch only on :ArtiPackUpdate or a forced sync, never from cache
- Record the branch, archive digest and fetch time in the lockfile
- Report a branch plugin as tracked and fetched, never as up to date
2026-09-12 00:08:18 +10:00

25 lines
757 B
Lua

if vim.g.loaded_arti_pack then
return
end
vim.g.loaded_arti_pack = true
local function arti()
return require('arti-pack')
end
vim.api.nvim_create_user_command('ArtiPackSync', function(cmd)
arti().sync({ force = cmd.bang })
end, { bang = true, desc = 'Install missing arti-pack plugins and apply changed refs' })
vim.api.nvim_create_user_command('ArtiPackUpdate', function()
arti().update()
end, { desc = 'Refetch every branch-tracking plugin' })
vim.api.nvim_create_user_command('ArtiPackClean', function()
arti().clean()
end, { desc = 'Remove installed plugins that are no longer in the spec' })
vim.api.nvim_create_user_command('ArtiPackList', function()
arti().list()
end, { desc = 'List configured arti-pack plugins and their state' })