mirror of
https://github.com/neovim/neovim
synced 2025-07-15 08:41:47 +00:00
Problem: No type information for `vim.uv`. Solution: Vendor https://github.com/LuaCATS/luv (which is what luals bundles). This will allow other tooling to work out-of-the-box and make these files available to users and plugins without the need for `lazydev.nvim` etc.
36 lines
1.1 KiB
Lua
36 lines
1.1 KiB
Lua
---@meta
|
|
-- luacheck: no unused args
|
|
error('Cannot require a meta file')
|
|
|
|
--- FS Event handles allow the user to monitor a given path for changes, for
|
|
--- example, if the file was renamed or there was a generic change in it. This
|
|
--- handle uses the best backend for the job on each platform.
|
|
---
|
|
---@class uv.uv_fs_event_t : uv.uv_handle_t
|
|
local fs_event = {} -- luacheck: no unused
|
|
|
|
--- Get the path being monitored by the handle.
|
|
---
|
|
---@return string|nil path
|
|
---@return uv.error.message|nil err
|
|
---@return uv.error.name|nil err_name
|
|
function fs_event:getpath() end
|
|
|
|
--- Start the handle with the given callback, which will watch the specified path
|
|
--- for changes.
|
|
---
|
|
---@param path string
|
|
---@param flags uv.fs_event_start.flags
|
|
---@param callback uv.fs_event_start.callback
|
|
---@return 0|nil success
|
|
---@return uv.error.message|nil err
|
|
---@return uv.error.name|nil err_name
|
|
function fs_event:start(path, flags, callback) end
|
|
|
|
--- Stop the handle, the callback will no longer be called.
|
|
---
|
|
---@return 0|nil success
|
|
---@return uv.error.message|nil err
|
|
---@return uv.error.name|nil err_name
|
|
function fs_event:stop() end
|