fix(types): add missing @return annotations

This commit is contained in:
Josh Cooper
2026-01-22 19:48:54 +00:00
committed by Lewis Russell
parent 1f0dbfea2f
commit 9988d7142d
4 changed files with 9 additions and 4 deletions

View File

@@ -783,8 +783,9 @@ count({bufnr}, {opts}) *vim.diagnostic.count()*
• {opts} (`vim.diagnostic.GetOpts?`) See |vim.diagnostic.GetOpts|.
Return: ~
(`table`) Table with actually present severity values as keys (see
|diagnostic-severity|) and integer counts as values.
(`table<integer, integer>`) Table with actually present severity
values as keys (see |diagnostic-severity|) and integer counts as
values.
enable({enable}, {filter}) *vim.diagnostic.enable()*
Enables or disables diagnostics.

View File

@@ -1637,7 +1637,7 @@ Lua module: vim.lsp.client *lsp-client*
See |Client:exec_cmd()|.
• {on_attach} (`fun(self: vim.lsp.Client, bufnr: integer)`)
See |Client:on_attach()|.
• {supports_method} (`fun(self: vim.lsp.Client, method: string|string, bufnr: integer?)`)
• {supports_method} (`fun(self: vim.lsp.Client, method: string|string, bufnr: integer?): boolean`)
See |Client:supports_method()|.
*vim.lsp.Client.Progress*
@@ -1897,6 +1897,9 @@ Client:supports_method({method}, {bufnr}) *Client:supports_method()*
• {method} (`string|string`)
• {bufnr} (`integer?`)
Return: ~
(`boolean`)
==============================================================================
Lua module: vim.lsp.codelens *lsp-codelens*

View File

@@ -1485,7 +1485,7 @@ end
---@param bufnr? integer Buffer number to get diagnostics from. Use 0 for
--- current buffer or nil for all buffers.
---@param opts? vim.diagnostic.GetOpts
---@return table : Table with actually present severity values as keys
---@return table<integer, integer> : Table with actually present severity values as keys
--- (see |diagnostic-severity|) and integer counts as values.
function M.count(bufnr, opts)
vim.validate('bufnr', bufnr, 'number', true)

View File

@@ -1191,6 +1191,7 @@ end
--- Note: Some language server capabilities can be file specific.
--- @param method vim.lsp.protocol.Method.ClientToServer | vim.lsp.protocol.Method.Registration
--- @param bufnr? integer
--- @return boolean
function Client:supports_method(method, bufnr)
-- Deprecated form
if type(bufnr) == 'table' then