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

* fix(#1815): don't schedule find file calls

* fix(#1815): debounce BufEnter find_file

* fix(#1815): deprecate nvim-tree.find_file

* fix(#1815): debounce BufEnter find_file

* fix(#1815): debounce BufEnter find_file
This commit is contained in:
Alexander Courtis
2022-12-16 13:01:37 +11:00
committed by GitHub
parent 95ed588211
commit 623cecb809
2 changed files with 29 additions and 13 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 = {},
},
@@ -507,6 +508,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`.