fix(#1815): don't schedule find_file calls, debounce update_focused_file with 15ms default (#1828)

* Revert "Revert "fix(#1815): don't schedule find_file calls, debounce update_focused_file with 15ms default (#1820)""

This reverts commit a8d26bb088.

* fix(#1723): find_file for externally created new file results in folder unable to be opened

* fix(#1723): find_file for externally created new file results in folder unable to be opened
This commit is contained in:
Alexander Courtis
2022-12-16 15:35:09 +11:00
committed by GitHub
parent d85b6718ce
commit 87409bb4af
2 changed files with 42 additions and 26 deletions

View File

@@ -280,6 +280,7 @@ Subsequent calls to setup will replace the previous configuration.
},
update_focused_file = {
enable = false,
debounce_delay = 15,
update_root = false,
ignore_list = {},
},
@@ -508,6 +509,11 @@ until it finds the file.
Enable this feature.
Type: `boolean`, Default: `false`
*nvim-tree.update_focused_file.debounce_delay*
Idle milliseconds between BufEnter and update.
The last BufEnter will be focused, others are discarded.
Type: `number`, Default: `15` (ms)
*nvim-tree.update_focused_file.update_root* (previously `update_focused_file.update_cwd`)
Update the root directory of the tree if the file is not under current
root directory. It prefers vim's cwd and `root_dirs`.