diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2022-12-08 10:55:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-08 10:55:09 -0700 |
commit | 9b14ad5fd9e15718aa938f7a426dddcc2edab4e3 (patch) | |
tree | 53d4bb16095fafb481aacdfe6e52febbfd66327c /runtime/lua/vim/lsp/protocol.lua | |
parent | 42009ac7df88bfffeea49a83e642fdc6cf9f9447 (diff) | |
parent | 9f035559defd9d575f37fd825954610065d9cf96 (diff) | |
download | rneovim-9b14ad5fd9e15718aa938f7a426dddcc2edab4e3.tar.gz rneovim-9b14ad5fd9e15718aa938f7a426dddcc2edab4e3.tar.bz2 rneovim-9b14ad5fd9e15718aa938f7a426dddcc2edab4e3.zip |
Merge pull request #21100 from jdrouhard/lsp_semantic_tokens
LSP: semantic tokens support
Diffstat (limited to 'runtime/lua/vim/lsp/protocol.lua')
-rw-r--r-- | runtime/lua/vim/lsp/protocol.lua | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua index 925115d056..dfbd01b8f8 100644 --- a/runtime/lua/vim/lsp/protocol.lua +++ b/runtime/lua/vim/lsp/protocol.lua @@ -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, |