diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index 4346a70546..866eb7a615 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -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`) 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. diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index a0f0d3420e..f715a795c2 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -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* diff --git a/runtime/lua/vim/diagnostic.lua b/runtime/lua/vim/diagnostic.lua index c1f5ff3832..0214b02cf0 100644 --- a/runtime/lua/vim/diagnostic.lua +++ b/runtime/lua/vim/diagnostic.lua @@ -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 : 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) diff --git a/runtime/lua/vim/lsp/client.lua b/runtime/lua/vim/lsp/client.lua index bbcb1e4806..8c5e4082d9 100644 --- a/runtime/lua/vim/lsp/client.lua +++ b/runtime/lua/vim/lsp/client.lua @@ -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