fix(util): clear buffer root cache when cwd change (#2502)
This commit is contained in:
1 parent
e8e7d22f56
commit
8386d23c81
1 file changed
+1
-1
@@ -144,7 +144,7 @@ function M.setup()
|
||||
Util.root.info()
|
||||
end, { desc = "LazyVim roots for the current buffer" })
|
||||
|
||||
vim.api.nvim_create_autocmd({ "LspAttach", "BufWritePost" }, {
|
||||
vim.api.nvim_create_autocmd({ "LspAttach", "BufWritePost", "DirChanged" }, {
|
||||
group = vim.api.nvim_create_augroup("lazyvim_root_cache", { clear = true }),
|
||||
callback = function(event)
|
||||
M.cache[event.buf] = nil
|
||||
|
||||
Reference in new issue
Block a user