doc: remove fs_poll interval and update doc
This commit is contained in:
@@ -278,7 +278,6 @@ Subsequent calls to setup will replace the previous configuration.
|
|||||||
},
|
},
|
||||||
filesystem_watchers = {
|
filesystem_watchers = {
|
||||||
enable = false,
|
enable = false,
|
||||||
interval = 100,
|
|
||||||
debounce_delay = 50,
|
debounce_delay = 50,
|
||||||
},
|
},
|
||||||
git = {
|
git = {
|
||||||
@@ -523,7 +522,7 @@ Git integration with icons and colors.
|
|||||||
process returned the data.
|
process returned the data.
|
||||||
|
|
||||||
*nvim-tree.filesystem_watchers*
|
*nvim-tree.filesystem_watchers*
|
||||||
Will use file system watcher (libuv fs_poll) to watch the filesystem for
|
Will use file system watcher (libuv fs_event) to watch the filesystem for
|
||||||
changes.
|
changes.
|
||||||
Using this will disable BufEnter / BufWritePost events in nvim-tree which
|
Using this will disable BufEnter / BufWritePost events in nvim-tree which
|
||||||
were used to update the whole tree. With this feature, the tree will be
|
were used to update the whole tree. With this feature, the tree will be
|
||||||
@@ -535,12 +534,6 @@ This will be experimental for a few weeks and will become the default.
|
|||||||
Enable / disable the feature.
|
Enable / disable the feature.
|
||||||
Type: `boolean`, Default: `false`
|
Type: `boolean`, Default: `false`
|
||||||
|
|
||||||
*nvim-tree.filesystem_watchers.interval*
|
|
||||||
Milliseconds between polls for each directory.
|
|
||||||
Increase to at least 1000ms if changes are not visible. See
|
|
||||||
https://github.com/luvit/luv/blob/master/docs.md#uvfs_poll_startfs_poll-path-interval-callback
|
|
||||||
Type: `number`, Default: `100` (ms)
|
|
||||||
|
|
||||||
*nvim-tree.filesystem_watchers.debounce_delay*
|
*nvim-tree.filesystem_watchers.debounce_delay*
|
||||||
Idle milliseconds between filesystem change and action.
|
Idle milliseconds between filesystem change and action.
|
||||||
Type: `number`, Default: `50` (ms)
|
Type: `number`, Default: `50` (ms)
|
||||||
|
|||||||
@@ -535,7 +535,6 @@ local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS
|
|||||||
},
|
},
|
||||||
filesystem_watchers = {
|
filesystem_watchers = {
|
||||||
enable = false,
|
enable = false,
|
||||||
interval = 100,
|
|
||||||
debounce_delay = 50,
|
debounce_delay = 50,
|
||||||
},
|
},
|
||||||
git = {
|
git = {
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ function M.create_watcher(absolute_path)
|
|||||||
log.line("watcher", "node start '%s'", absolute_path)
|
log.line("watcher", "node start '%s'", absolute_path)
|
||||||
return Watcher.new {
|
return Watcher.new {
|
||||||
absolute_path = absolute_path,
|
absolute_path = absolute_path,
|
||||||
interval = M.interval,
|
|
||||||
on_event = function(opts)
|
on_event = function(opts)
|
||||||
log.line("watcher", "node event scheduled '%s'", opts.absolute_path)
|
log.line("watcher", "node event scheduled '%s'", opts.absolute_path)
|
||||||
utils.debounce("explorer:watch:" .. opts.absolute_path, M.debounce_delay, function()
|
utils.debounce("explorer:watch:" .. opts.absolute_path, M.debounce_delay, function()
|
||||||
@@ -60,7 +59,6 @@ end
|
|||||||
|
|
||||||
function M.setup(opts)
|
function M.setup(opts)
|
||||||
M.enabled = opts.filesystem_watchers.enable
|
M.enabled = opts.filesystem_watchers.enable
|
||||||
M.interval = opts.filesystem_watchers.interval
|
|
||||||
M.debounce_delay = opts.filesystem_watchers.debounce_delay
|
M.debounce_delay = opts.filesystem_watchers.debounce_delay
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,6 @@ function M.load_project_status(cwd)
|
|||||||
watcher = Watcher.new {
|
watcher = Watcher.new {
|
||||||
absolute_path = utils.path_join { project_root, ".git" },
|
absolute_path = utils.path_join { project_root, ".git" },
|
||||||
project_root = project_root,
|
project_root = project_root,
|
||||||
interval = M.config.filesystem_watchers.interval,
|
|
||||||
on_event = function(opts)
|
on_event = function(opts)
|
||||||
log.line("watcher", "git event scheduled '%s'", opts.project_root)
|
log.line("watcher", "git event scheduled '%s'", opts.project_root)
|
||||||
utils.debounce("git:watcher:" .. opts.project_root, M.config.filesystem_watchers.debounce_delay, function()
|
utils.debounce("git:watcher:" .. opts.project_root, M.config.filesystem_watchers.debounce_delay, function()
|
||||||
|
|||||||
Reference in New Issue
Block a user