mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00: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:
@@ -715,8 +715,8 @@ end
|
||||
--- Turns the result of a `textDocument/completion` request into vim-compatible
|
||||
--- |complete-items|.
|
||||
---
|
||||
---@param result table The result of a `textDocument/completion` call, e.g. from
|
||||
---|vim.lsp.buf.completion()|, which may be one of `CompletionItem[]`,
|
||||
---@param result table The result of a `textDocument/completion` call, e.g.
|
||||
--- from |vim.lsp.buf.completion()|, which may be one of `CompletionItem[]`,
|
||||
--- `CompletionList` or `null`
|
||||
---@param prefix (string) the prefix to filter the completion items
|
||||
---@return table { matches = complete-items table, incomplete = bool }
|
||||
|
Reference in New Issue
Block a user