mirror of https://github.com/folke/lazy.nvim.git
fix(pkg): automatically update pkgs when editing a pkg file
This commit is contained in:
parent
3515cb518f
commit
7b6ddbfc13
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue