mirror of
https://github.com/neovim/neovim.git
synced 2024-12-25 21:55:17 -07:00
c43c745a14
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
23 lines
646 B
Lua
23 lines
646 B
Lua
---@meta
|
|
error('Cannot require a meta file')
|
|
|
|
---@alias lsp-handler fun(err: lsp.ResponseError|nil, result: any, context: lsp.HandlerContext, config: table|nil): any?
|
|
|
|
---@class lsp.HandlerContext
|
|
---@field method string
|
|
---@field client_id integer
|
|
---@field bufnr? integer
|
|
---@field params? any
|
|
|
|
---@class lsp.ResponseError
|
|
---@field code integer
|
|
---@field message string
|
|
---@field data string|number|boolean|table[]|table|nil
|
|
|
|
--- @class lsp.DocumentFilter
|
|
--- @field language? string
|
|
--- @field scheme? string
|
|
--- @field pattern? string
|
|
|
|
--- @alias lsp.RegisterOptions any | lsp.StaticRegistrationOptions | lsp.TextDocumentRegistrationOptions
|