mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 09:12:07 +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:
@@ -119,9 +119,8 @@ end
|
||||
--- - path (string|nil): Path to a file to update. Mutually exclusive with {bufnr}.
|
||||
--- Cannot be used when {action} is "allow".
|
||||
--- - bufnr (number|nil): Buffer number to update. Mutually exclusive with {path}.
|
||||
---@return (boolean, string) success, msg:
|
||||
--- - true and full path of target file if operation was successful
|
||||
--- - false and error message on failure
|
||||
---@return boolean success true if operation was successful
|
||||
---@return string msg full path if operation was successful, else error message
|
||||
function M.trust(opts)
|
||||
vim.validate({
|
||||
path = { opts.path, 's', true },
|
||||
|
Reference in New Issue
Block a user