fix(#2240): disable watchers following EMFILE (#2268)

* fix(#2240): disable watchers following EMFILE

* fix(#2240): disable watchers following EMFILE
This commit is contained in:
Alexander Courtis
2023-06-18 11:42:48 +10:00
committed by GitHub
parent f873625d06
commit d4f6d33496
10 changed files with 101 additions and 65 deletions

View File

@@ -4,7 +4,9 @@ local utils = require "nvim-tree.utils"
local FsRename = require "nvim-tree.actions.fs.rename-file"
local notify = require "nvim-tree.notify"
local M = {}
local M = {
config = {},
}
function M.bulk_move()
if #Marks.get_marks() == 0 then
@@ -29,14 +31,14 @@ function M.bulk_move()
FsRename.rename(node, to)
end
if M.enable_reload then
if not M.config.filesystem_watchers.enable then
require("nvim-tree.actions.reloaders.reloaders").reload_explorer()
end
end)
end
function M.setup(opts)
M.enable_reload = not opts.filesystem_watchers.enable
M.config.filesystem_watchers = opts.filesystem_watchers
end
return M