Skip to content

Commit

Permalink
fix(pkg): automatically update pkgs when editing a pkg file
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 24, 2024
1 parent 3515cb5 commit 7b6ddbf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lua/lazy/core/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7b6ddbf

Please sign in to comment.