feat: packspec

This commit is contained in:
Folke Lemaitre 2024-06-18 19:40:58 +02:00
parent 4ea9fe0600
commit 8eba74c3fc
6 changed files with 190 additions and 2 deletions

View file

@ -179,6 +179,11 @@ M.defaults = {
-- Track each new require in the Lazy profiling tab
require = false,
},
packspec = {
enabled = true,
versions = true, -- Honor dependency versions in packspecs
path = vim.fn.stdpath("state") .. "/lazy/packspec.lua",
},
debug = false,
}
@ -281,6 +286,14 @@ function M.setup(opts)
require("lazy.manage.checker").start()
end, 10)
end
-- useful for plugin developers when making changes to a packspec file
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = "package.lua",
callback = function()
require("lazy.view.commands").cmd("packspec")
end,
})
end,
})