The list is filtered against {query}; if the argument is omitted from the
call, the user is prompted to enter a string on the command line. An empty
string means no filtering is done.
Parameters: ~
• {query} (`string?`) optional
• {opts} (`vim.lsp.ListOpts?`) See |vim.lsp.ListOpts|.
==============================================================================
Lua module: vim.lsp.diagnostic *lsp-diagnostic*
from({diagnostics}) *vim.lsp.diagnostic.from()*
Converts the input `vim.Diagnostic`s to LSP diagnostics.
Parameters: ~
• {diagnostics} (`vim.Diagnostic[]`)
Return: ~
(`lsp.Diagnostic[]`)
*vim.lsp.diagnostic.get_namespace()*
get_namespace({client_id}, {is_pull})
Get the diagnostic namespace associated with an LSP client
|vim.diagnostic| for diagnostics
Parameters: ~
• {client_id} (`integer`) The id of the LSP client
• {is_pull} (`boolean?`) Whether the namespace is for a pull or push
client. Defaults to push
*vim.lsp.diagnostic.on_diagnostic()*
on_diagnostic({error}, {result}, {ctx})
|lsp-handler| for the method "textDocument/diagnostic"
See |vim.diagnostic.config()| for configuration options.
Parameters: ~
• {error} (`lsp.ResponseError?`)
• {result} (`lsp.DocumentDiagnosticReport`)
• {ctx} (`lsp.HandlerContext`)
*vim.lsp.diagnostic.on_publish_diagnostics()*
on_publish_diagnostics({_}, {params}, {ctx})
|lsp-handler| for the method "textDocument/publishDiagnostics"
See |vim.diagnostic.config()| for configuration options.
Parameters: ~
• {params} (`lsp.PublishDiagnosticsParams`)
• {ctx} (`lsp.HandlerContext`)
==============================================================================
Lua module: vim.lsp.codelens *lsp-codelens*
clear({client_id}, {bufnr}) *vim.lsp.codelens.clear()*
Clear the lenses
Parameters: ~
• {client_id} (`integer?`) filter by client_id. All clients if nil
• {bufnr} (`integer?`) filter by buffer. All buffers if nil, 0 for
current buffer
display({lenses}, {bufnr}, {client_id}) *vim.lsp.codelens.display()*
Display the lenses using virtual text
Parameters: ~
• {lenses} (`lsp.CodeLens[]?`) lenses to display
• {bufnr} (`integer`)
• {client_id} (`integer`)
get({bufnr}) *vim.lsp.codelens.get()*
Return all lenses for the given buffer
Parameters: ~
• {bufnr} (`integer`) Buffer number. 0 can be used for the current
buffer.
Return: ~
(`lsp.CodeLens[]`)
on_codelens({err}, {result}, {ctx}) *vim.lsp.codelens.on_codelens()*
|lsp-handler| for the method `textDocument/codeLens`
Parameters: ~
• {err} (`lsp.ResponseError?`)
• {result} (`lsp.CodeLens[]`)
• {ctx} (`lsp.HandlerContext`)
refresh({opts}) *vim.lsp.codelens.refresh()*
Refresh the lenses.
It is recommended to trigger this using an autocmd or via keymap.
Example: >vim
autocmd BufEnter,CursorHold,InsertLeave <buffer> lua vim.lsp.codelens.refresh({ bufnr = 0 })
<
Parameters: ~
• {opts} (`table?`) Optional fields
• {bufnr} (`integer?`) filter by buffer. All buffers if nil, 0
for current buffer
run() *vim.lsp.codelens.run()*
Run the code lens in the current line
save({lenses}, {bufnr}, {client_id}) *vim.lsp.codelens.save()*
Store lenses for a specific buffer and client
Parameters: ~
• {lenses} (`lsp.CodeLens[]?`) lenses to store
•