mirror of
https://github.com/neovim/neovim.git
synced 2026-01-06 19:39:53 +10:00
fix(lua): improve annotations for stricter luals diagnostics (#24609)
Problem: luals returns stricter diagnostics with bundled luarc.json Solution: Improve some function and type annotations: * use recognized uv.* types * disable diagnostic for global `vim` in shared.lua * docs: don't start comment lines with taglink (otherwise LuaLS will interpret it as a type) * add type alias for lpeg pattern * fix return annotation for `vim.secure.trust` * rename local Range object in vim.version (shadows `Range` in vim.treesitter) * fix some "missing fields" warnings * add missing required fields for test functions in eval.lua * rename lsp meta files for consistency
This commit is contained in:
@@ -17,7 +17,7 @@ end
|
||||
|
||||
--- Stops and closes a libuv |uv_fs_event_t| or |uv_fs_poll_t| handle
|
||||
---
|
||||
---@param handle (uv_fs_event_t|uv_fs_poll_t) The handle to stop
|
||||
---@param handle (uv.uv_fs_event_t|uv.uv_fs_poll_t) The handle to stop
|
||||
local function stop(handle)
|
||||
local _, stop_err = handle:stop()
|
||||
assert(not stop_err, stop_err)
|
||||
@@ -79,7 +79,7 @@ local default_poll_interval_ms = 2000
|
||||
--- @field children? table<string,watch.Watches>
|
||||
--- @field cancel? fun()
|
||||
--- @field started? boolean
|
||||
--- @field handle? uv_fs_poll_t
|
||||
--- @field handle? uv.uv_fs_poll_t
|
||||
|
||||
--- @class watch.PollOpts
|
||||
--- @field interval? integer
|
||||
|
||||
Reference in New Issue
Block a user