Broken Nvim-tree directory changes #3043
-
In previous nvim-tree version I could open a file with nvim from terminal and if I toggled the tree it would show the tree with focus on file, in the correct directory of file. I read the docs and set this require('nvim-tree').setup {
sync_root_with_cwd = true,
respect_buf_cwd = true,
actions = {
change_dir = {
global= true
}
}
}
However it doesn't seem to make any difference.... |
Beta Was this translation helpful? Give feedback.
Answered by
KoshulaDora
Jan 4, 2025
Replies: 1 comment
-
I asked chatgpt and its suggestion of adding these: require("nvim-tree").setup({
update_focused_file = {
enable = true, -- Enables the update for the focused file
update_cwd = true, -- Changes the tree's directory to the file's directory
ignore_list = {}, -- List of filetypes to ignore
},
respect_buf_cwd = true, -- Ensures the tree respects the current buffer's cwd
sync_root_with_cwd = true, -- Syncs the tree root with Neovim's cwd
}) Seems to solve the issue. I am putting this here for anyone else who is puzzled by the updates as I have been. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
KoshulaDora
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I asked chatgpt and its suggestion of adding these:
Seems to solve the issue. I am putting this here for anyone else who is puzzled by the updates as I have been.