mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-23 17:28:57 +02:00
fix(util): clear buffer root cache when cwd change (#2502)
This commit is contained in:
parent
e8e7d22f56
commit
8386d23c81
1 changed files with 1 additions and 1 deletions
|
@ -144,7 +144,7 @@ function M.setup()
|
||||||
Util.root.info()
|
Util.root.info()
|
||||||
end, { desc = "LazyVim roots for the current buffer" })
|
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 }),
|
group = vim.api.nvim_create_augroup("lazyvim_root_cache", { clear = true }),
|
||||||
callback = function(event)
|
callback = function(event)
|
||||||
M.cache[event.buf] = nil
|
M.cache[event.buf] = nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue