nvim-tree.lua
nvim-tree.lua copied to clipboard
Updating focused file under directory results in base cwd being changed
Is your feature request related to a problem? Please describe. Hello, I used
update_focused_file = {
enable = true,
update_cwd = true,
}
I am in project Pro, and this project has a file Pro/Dir/a.cpp
When I open a.cpp, the 'cwd' changed to the directory Dir.
I think it should not change the work dir, because I am not leave the project dir, I just expand the project. and it would be good if change work dir only using action 'cd' and 'dir_up'.
That is the intended functionality for update_focused_file.update_cwd
.
update_cwd
is the option you want: changes dir when you change the tree dir or vim's dir. See :help nvim-tree.update_cwd
@alex-courtis seems like it's not, the file should be found and the the cwd should not be updated. It should update the cwd only if the file is not found under this cwd. Looks like a bug to me.
Looks like a bug that i cannot reproduce. @fgheng would you be so kind to share a minimal config ?
Closing due to inactivity.