sync_root_with_cwd appears to be broken #2690
-
DescriptionIf one opens a new buffer after having changed the current working directory through nvim-tree's Neovim version
Operating system and versionmacOS 14.3.1 Windows variantNo response nvim-tree versionClean room replicationrequire("nvim-tree").setup({sync_root_with_cwd = true}) Steps to reproduce
Expected behavior
Actual behavior
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
*nvim-tree.sync_root_with_cwd*
Changes the tree root directory on `DirChanged` and refreshes the tree.
Type: `boolean`, Default: `false` In your case, a
However, I'm not quite sure that's what you're after... |
Beta Was this translation helpful? Give feedback.
-
*nvim-tree.actions.change_dir*
vim |current-directory| behaviour.
*nvim-tree.actions.change_dir.enable*
Change the working directory when changing directories in the tree.
Type: `boolean`, Default: `true`
*nvim-tree.actions.change_dir.global*
Use `:cd` instead of `:lcd` when changing directories.
Consider that this might cause issues with the
|nvim-tree.sync_root_with_cwd| option.
Type: `boolean`, Default: `false`
*nvim-tree.actions.change_dir.restrict_above_cwd*
Restrict changing to a directory above the global cwd.
Type: `boolean`, Default: `false` |
Beta Was this translation helpful? Give feedback.
-
Better documentation of all these changing directory behaviours is needed: #2405 |
Beta Was this translation helpful? Give feedback.
actions.change_dir.global
will set the global cwd when changing directories in the tree: