mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
perf(lsp): use async fs_stat for file watching on linux (#26123)
This commit is contained in:
committed by
GitHub
parent
e89071522c
commit
7e97c773e3
@ -132,7 +132,7 @@ local function recurse_watch(path, opts, callback)
|
||||
end
|
||||
end
|
||||
for fullpath, events_list in pairs(filechanges) do
|
||||
local stat = uv.fs_stat(fullpath)
|
||||
uv.fs_stat(fullpath, function(_, stat)
|
||||
---@type vim._watch.FileChangeType
|
||||
local change_type
|
||||
if stat then
|
||||
@ -161,6 +161,7 @@ local function recurse_watch(path, opts, callback)
|
||||
change_type = FileChangeType.Deleted
|
||||
end
|
||||
callback(fullpath, change_type)
|
||||
end)
|
||||
end
|
||||
end
|
||||
local root_handle = assert(uv.new_fs_event())
|
||||
|
Reference in New Issue
Block a user