chore: stylua column width 120 -> 140 (#2448)
* chore: stylua column width 120 -> 140
* chore: stylua column width 120 -> 140, tidy
* Revert "chore: stylua column width 120 -> 140, tidy"
This reverts commit 8a0524d6bd.
* chore: stylua column width 120 -> 140, tidy watcher.lua
* chore: stylua column width 120 -> 140, tidy diagnostics.lua
* chore: stylua column width 120 -> 140, tidy git.lua
* chore: stylua column width 120 -> 140, tidy open-file.lua
* chore: stylua column width 120 -> 140, tidy system-open.lua
* chore: stylua column width 120 -> 140, tidy runner.lua
This commit is contained in:
committed by
GitHub
parent
94e572e141
commit
53b0bcaada
@@ -73,14 +73,10 @@ function Event:start()
|
||||
|
||||
rc, _, name = self._fs_event:start(self._path, FS_EVENT_FLAGS, event_cb)
|
||||
if rc ~= 0 then
|
||||
local warning = string.format("Could not start the fs_event watcher for path %s : %s", self._path, name)
|
||||
if name == "EMFILE" then
|
||||
M.disable_watchers(
|
||||
warning,
|
||||
"Please see https://github.com/nvim-tree/nvim-tree.lua/wiki/Troubleshooting#could-not-start-fs_event-for-path--emfile"
|
||||
)
|
||||
M.disable_watchers "fs.inotify.max_user_watches exceeded, see https://github.com/nvim-tree/nvim-tree.lua/wiki/Troubleshooting"
|
||||
else
|
||||
notify.warn(warning)
|
||||
notify.warn(string.format("Could not start the fs_event watcher for path %s : %s", self._path, name))
|
||||
end
|
||||
return false
|
||||
end
|
||||
@@ -164,10 +160,9 @@ end
|
||||
M.Watcher = Watcher
|
||||
|
||||
--- Permanently disable watchers and purge all state following a catastrophic error.
|
||||
--- @param warning string
|
||||
--- @param detail string
|
||||
function M.disable_watchers(warning, detail)
|
||||
notify.warn(string.format("%s Disabling watchers: %s", warning, detail))
|
||||
--- @param msg string
|
||||
function M.disable_watchers(msg)
|
||||
notify.warn(string.format("Disabling watchers: %s", msg))
|
||||
M.config.filesystem_watchers.enable = false
|
||||
require("nvim-tree").purge_all_state()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user