fix(pkg): only show pkg changed when effectively changing a pkg file. Fixes #1567

This commit is contained in:
Folke Lemaitre 2024-06-27 09:48:37 +02:00
parent 591ded8309
commit 24a86d5ca4
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 4 additions and 5 deletions

View File

@ -311,11 +311,10 @@ function M.setup(opts)
vim.api.nvim_create_autocmd("BufWritePost", { vim.api.nvim_create_autocmd("BufWritePost", {
pattern = { "lazy.lua", "pkg.json", "*.rockspec" }, pattern = { "lazy.lua", "pkg.json", "*.rockspec" },
callback = function() callback = function()
require("lazy").pkg({ local plugin = require("lazy.core.plugin").find(vim.uv.cwd() .. "/lua/")
plugins = { if plugin then
require("lazy.core.plugin").find(vim.uv.cwd() .. "/lua/"), require("lazy").pkg({ plugins = { plugin } })
}, end
})
end, end,
}) })
end, end,