feat(lua): rename vim.loop -> vim.uv (#22846)

This commit is contained in:
Lewis Russell
2023-06-03 11:06:00 +01:00
committed by GitHub
parent c65e2203f7
commit 2db719f6c2
41 changed files with 147 additions and 145 deletions

View File

@@ -46,7 +46,7 @@ function M.watch(path, opts, callback)
path = vim.fs.normalize(path)
local uvflags = opts and opts.uvflags or {}
local handle, new_err = vim.loop.new_fs_event()
local handle, new_err = vim.uv.new_fs_event()
assert(not new_err, new_err)
local _, start_err = handle:start(path, uvflags, function(err, filename, events)
assert(not err, err)
@@ -57,7 +57,7 @@ function M.watch(path, opts, callback)
end
local change_type = events.change and M.FileChangeType.Changed or 0
if events.rename then
local _, staterr, staterrname = vim.loop.fs_stat(fullpath)
local _, staterr, staterrname = vim.uv.fs_stat(fullpath)
if staterrname == 'ENOENT' then
change_type = M.FileChangeType.Deleted
else
@@ -99,7 +99,7 @@ local function poll_internal(path, opts, callback, watches)
}
if not watches.handle then
local poll, new_err = vim.loop.new_fs_poll()
local poll, new_err = vim.uv.new_fs_poll()
assert(not new_err, new_err)
watches.handle = poll
local _, start_err = poll:start(