mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Config to switch to semantic tokens
This commit is contained in:
parent
8c0d0894b6
commit
225ef6dea2
4 changed files with 15 additions and 3 deletions
|
@ -27,7 +27,7 @@ export async function createClient(config: Config, serverPath: string): Promise<
|
|||
const clientOptions: lc.LanguageClientOptions = {
|
||||
documentSelector: [{ scheme: 'file', language: 'rust' }],
|
||||
initializationOptions: {
|
||||
publishDecorations: true,
|
||||
publishDecorations: !config.highlightingSemanticTokens,
|
||||
lruCapacity: config.lruCapacity,
|
||||
maxInlayHintLength: config.maxInlayHintLength,
|
||||
cargoWatchEnable: cargoWatchOpts.enable,
|
||||
|
@ -84,7 +84,10 @@ export async function createClient(config: Config, serverPath: string): Promise<
|
|||
// Here we want to just enable CallHierarchyFeature since it is available on stable.
|
||||
// Note that while the CallHierarchyFeature is stable the LSP protocol is not.
|
||||
res.registerFeature(new CallHierarchyFeature(res));
|
||||
res.registerFeature(new SemanticTokensFeature(res));
|
||||
|
||||
if (config.highlightingSemanticTokens) {
|
||||
res.registerFeature(new SemanticTokensFeature(res));
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue