diff options
Diffstat (limited to 'editors/code/src/client.ts')
-rw-r--r-- | editors/code/src/client.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts index f9dbe34c2..44bd04c21 100644 --- a/editors/code/src/client.ts +++ b/editors/code/src/client.ts | |||
@@ -27,7 +27,7 @@ export async function createClient(config: Config, serverPath: string): Promise< | |||
27 | const clientOptions: lc.LanguageClientOptions = { | 27 | const clientOptions: lc.LanguageClientOptions = { |
28 | documentSelector: [{ scheme: 'file', language: 'rust' }], | 28 | documentSelector: [{ scheme: 'file', language: 'rust' }], |
29 | initializationOptions: { | 29 | initializationOptions: { |
30 | publishDecorations: true, | 30 | publishDecorations: !config.highlightingSemanticTokens, |
31 | lruCapacity: config.lruCapacity, | 31 | lruCapacity: config.lruCapacity, |
32 | maxInlayHintLength: config.maxInlayHintLength, | 32 | maxInlayHintLength: config.maxInlayHintLength, |
33 | cargoWatchEnable: cargoWatchOpts.enable, | 33 | cargoWatchEnable: cargoWatchOpts.enable, |
@@ -84,7 +84,10 @@ export async function createClient(config: Config, serverPath: string): Promise< | |||
84 | // Here we want to just enable CallHierarchyFeature since it is available on stable. | 84 | // Here we want to just enable CallHierarchyFeature since it is available on stable. |
85 | // Note that while the CallHierarchyFeature is stable the LSP protocol is not. | 85 | // Note that while the CallHierarchyFeature is stable the LSP protocol is not. |
86 | res.registerFeature(new CallHierarchyFeature(res)); | 86 | res.registerFeature(new CallHierarchyFeature(res)); |
87 | res.registerFeature(new SemanticTokensFeature(res)); | 87 | |
88 | if (config.highlightingSemanticTokens) { | ||
89 | res.registerFeature(new SemanticTokensFeature(res)); | ||
90 | } | ||
88 | 91 | ||
89 | return res; | 92 | return res; |
90 | } | 93 | } |