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
70f54078e0
commit
7e20395324
|
@ -318,9 +318,13 @@ function M.setup(opts)
|
||||||
|
|
||||||
-- useful for plugin developers when making changes to a packspec file
|
-- useful for plugin developers when making changes to a packspec file
|
||||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
pattern = "lazy.lua",
|
pattern = { "lazy.lua", "pkg.json", "*.rockspec" },
|
||||||
callback = function()
|
callback = function()
|
||||||
require("lazy.view.commands").cmd("pkg")
|
require("lazy").pkg({
|
||||||
|
plugins = {
|
||||||
|
require("lazy.core.plugin").find(vim.uv.cwd() .. "/lua/"),
|
||||||
|
},
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue