fix(pkg): automatically update pkgs when editing a pkg file

This commit is contained in:
Folke Lemaitre 2024-06-23 22:15:10 +02:00
parent 3515cb518f
commit 7b6ddbfc13
1 changed files with 6 additions and 2 deletions

View File

@ -318,9 +318,13 @@ function M.setup(opts)
-- useful for plugin developers when making changes to a packspec file
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = "lazy.lua",
pattern = { "lazy.lua", "pkg.json", "*.rockspec" },
callback = function()
require("lazy.view.commands").cmd("pkg")
require("lazy").pkg({
plugins = {
require("lazy.core.plugin").find(vim.uv.cwd() .. "/lua/"),
},
})
end,
})
end,