disable update cwd by default

This commit is contained in:
kiyan 2021-06-11 08:37:15 +02:00
parent 906a35cd0e
commit 43a7b529c0
3 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ let g:nvim_tree_lsp_diagnostics = 1 "0 by default, will show lsp diagnostics in
let g:nvim_tree_disable_window_picker = 1 "0 by default, will disable the window picker.
let g:nvim_tree_hijack_cursor = 0 "1 by default, when moving cursor in the tree, will position the cursor at the start of the file on the current line
let g:nvim_tree_icon_padding = ' ' "one space by default, used for rendering the space between the icon and the filename. Use with caution, it could break rendering if you set an empty string depending on your font.
let g:nvim_tree_update_cwd = 0 "1 by default, will update the tree cwd when changing nvim's directory (DirChanged event). Behaves strangely with autochdir set.
let g:nvim_tree_update_cwd = 1 "0 by default, will update the tree cwd when changing nvim's directory (DirChanged event). Behaves strangely with autochdir set.
let g:nvim_tree_window_picker_exclude = {
\ 'filetype': [
\ 'packer',

View File

@ -299,7 +299,7 @@ One space by default, used for rendering the space between the icon and the file
|g:nvim_tree_update_cwd|
Can be 0 or 1. 1 by default.
Can be 0 or 1. 0 by default.
Will update the tree cwd when changing nvim's directory (DirChanged event).
WARNING: Behaves strangely with autochdir set.

View File

@ -29,7 +29,7 @@ augroup NvimTree
if get(g:, 'nvim_tree_hijack_cursor', 1) == 1
au CursorMoved NvimTree lua require'nvim-tree'.place_cursor_on_node()
endif
if get(g:, 'nvim_tree_update_cwd', 1) == 1
if get(g:, 'nvim_tree_update_cwd') == 1
au DirChanged * lua require'nvim-tree.lib'.change_dir(vim.loop.cwd())
endif
augroup end