Closed ghost closed 2 years ago
Hey! There is a command :NvimTreeRefresh
that will refresh the tree. You could add this as an open hook
hooks = {
open = {
"NvimTreeRefresh",
},
}
Alternatively, nvim-tree has a setting update_cwd
that changes the tree root automatically each time the DirChange
event occurs.
require("nvim-tree").setup({
update_cwd = true,
})
Let me know if that helps!
When I switch between workspaces I get this error, but, If I disable the "NvimTreeRefresh" instead the telescope find_files, this works, thanks for your help, only I needed change that property for true, sorry for that, I am grateful.
Glad it works!
It's possible that you are lazy-loading nvim-tree and that's why the command didn't work.
Yes! I'm using lazy-loading, thanks for that!
Please add this for the wiki or readme, I think it might be useful to someone.
Exist some way to refresh the nvimTree when I change in workspaces?