mirror of
https://github.com/neovim/neovim.git
synced 2025-12-12 09:32:39 +00:00
feat(lsp): semanticTokens/range #36705
Problem: Nvim supports `textDocument/semanticTokens/full` and `…/full/delta` already, but most servers don't support `…/full/delta` and Nvim will try to request and process full semantic tokens response on every buffer change. Even though the request is debounced, there is noticeable lag if the token response is large (in a big file). Solution: Support `textDocument/semanticTokens/range`, which requests semantic tokens for visible screen only.
This commit is contained in:
@@ -616,6 +616,7 @@ local static_registration_capabilities = {
|
||||
['textDocument/moniker'] = 'monikerProvider',
|
||||
['textDocument/selectionRange'] = 'selectionRangeProvider',
|
||||
['textDocument/semanticTokens/full'] = 'semanticTokensProvider',
|
||||
['textDocument/semanticTokens/range'] = 'semanticTokensProvider',
|
||||
['textDocument/typeDefinition'] = 'typeDefinitionProvider',
|
||||
['textDocument/prepareTypeHierarchy'] = 'typeHierarchyProvider',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user