aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/lsp.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/lsp.txt')
-rw-r--r--runtime/doc/lsp.txt49
1 files changed, 49 insertions, 0 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index 4c4403c38f..22593d8331 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -1320,6 +1320,55 @@ save({lenses}, {bufnr}, {client_id}) *vim.lsp.codelens.save()*
==============================================================================
+Lua module: vim.lsp.semantic_tokens *lsp-semantic_tokens*
+
+force_refresh({bufnr}) *vim.lsp.semantic_tokens.force_refresh()*
+ Force a refresh of all semantic tokens
+
+ Only has an effect if the buffer is currently active for semantic token
+ highlighting (|vim.lsp.semantic_tokens.start()| has been called for it)
+
+ Parameters: ~
+ • {bufnr} (nil|number) default: current buffer
+
+start({bufnr}, {client_id}, {opts}) *vim.lsp.semantic_tokens.start()*
+ Start the semantic token highlighting engine for the given buffer with the
+ given client. The client must already be attached to the buffer.
+
+ NOTE: This is currently called automatically by
+ |vim.lsp.buf_attach_client()|. To opt-out of semantic highlighting with a
+ server that supports it, you can delete the semanticTokensProvider table
+ from the {server_capabilities} of your client in your |LspAttach| callback
+ or your configuration's `on_attach` callback.
+
+ >lua
+
+ client.server_capabilities.semanticTokensProvider = nil
+<
+
+ Parameters: ~
+ • {bufnr} (number)
+ • {client_id} (number)
+ • {opts} (nil|table) Optional keyword arguments
+ • debounce (number, default: 200): Debounce token
+ requests to the server by the given number in
+ milliseconds
+
+stop({bufnr}, {client_id}) *vim.lsp.semantic_tokens.stop()*
+ Stop the semantic token highlighting engine for the given buffer with the
+ given client.
+
+ NOTE: This is automatically called by a |LspDetach| autocmd that is set up
+ as part of `start()`, so you should only need this function to manually
+ disengage the semantic token engine without fully detaching the LSP client
+ from the buffer.
+
+ Parameters: ~
+ • {bufnr} (number)
+ • {client_id} (number)
+
+
+==============================================================================
Lua module: vim.lsp.handlers *lsp-handlers*
hover({_}, {result}, {ctx}, {config}) *vim.lsp.handlers.hover()*