mirror of
https://github.com/neovim/neovim.git
synced 2025-12-07 07:02:46 +00:00
feat(lsp): initial support for semantic token highlighting
* credit to @smolck and @theHamsta for their contributions in laying the groundwork for this feature and for their work on some of the helper utility functions and tests
This commit is contained in:
@@ -629,6 +629,58 @@ export interface WorkspaceClientCapabilities {
|
||||
function protocol.make_client_capabilities()
|
||||
return {
|
||||
textDocument = {
|
||||
semanticTokens = {
|
||||
dynamicRegistration = false,
|
||||
tokenTypes = {
|
||||
'namespace',
|
||||
'type',
|
||||
'class',
|
||||
'enum',
|
||||
'interface',
|
||||
'struct',
|
||||
'typeParameter',
|
||||
'parameter',
|
||||
'variable',
|
||||
'property',
|
||||
'enumMember',
|
||||
'event',
|
||||
'function',
|
||||
'method',
|
||||
'macro',
|
||||
'keyword',
|
||||
'modifier',
|
||||
'comment',
|
||||
'string',
|
||||
'number',
|
||||
'regexp',
|
||||
'operator',
|
||||
'decorator',
|
||||
},
|
||||
tokenModifiers = {
|
||||
'declaration',
|
||||
'definition',
|
||||
'readonly',
|
||||
'static',
|
||||
'deprecated',
|
||||
'abstract',
|
||||
'async',
|
||||
'modification',
|
||||
'documentation',
|
||||
'defaultLibrary',
|
||||
},
|
||||
formats = { 'relative' },
|
||||
requests = {
|
||||
-- TODO(jdrouhard): Add support for this
|
||||
range = false,
|
||||
full = { delta = true },
|
||||
},
|
||||
|
||||
overlappingTokenSupport = true,
|
||||
-- TODO(jdrouhard): Add support for this
|
||||
multilineTokenSupport = false,
|
||||
serverCancelSupport = false,
|
||||
augmentsSyntaxTokens = true,
|
||||
},
|
||||
synchronization = {
|
||||
dynamicRegistration = false,
|
||||
|
||||
@@ -772,6 +824,9 @@ function protocol.make_client_capabilities()
|
||||
workspaceEdit = {
|
||||
resourceOperations = { 'rename', 'create', 'delete' },
|
||||
},
|
||||
semanticTokens = {
|
||||
refreshSupport = true,
|
||||
},
|
||||
},
|
||||
callHierarchy = {
|
||||
dynamicRegistration = false,
|
||||
|
||||
Reference in New Issue
Block a user