Skip to content

Commit 8c0d089

Browse files
authored
Merge pull request #3321 from kjeremy/semantic-client
Enable SemanticTokens on the client
2 parents 2dee077 + 74125d0 commit 8c0d089

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

editors/code/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"engines": {
1919
"vscode": "^1.42.0"
2020
},
21+
"enableProposedApi": true,
2122
"scripts": {
2223
"vscode:prepublish": "tsc && rollup -c",
2324
"package": "vsce package -o rust-analyzer.vsix",

editors/code/src/client.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as vscode from 'vscode';
33

44
import { Config } from './config';
55
import { CallHierarchyFeature } from 'vscode-languageclient/lib/callHierarchy.proposed';
6+
import { SemanticTokensFeature } from 'vscode-languageclient/lib/semanticTokens.proposed';
67

78
export async function createClient(config: Config, serverPath: string): Promise<lc.LanguageClient> {
89
// '.' Is the fallback if no folder is open
@@ -83,5 +84,7 @@ export async function createClient(config: Config, serverPath: string): Promise<
8384
// Here we want to just enable CallHierarchyFeature since it is available on stable.
8485
// Note that while the CallHierarchyFeature is stable the LSP protocol is not.
8586
res.registerFeature(new CallHierarchyFeature(res));
87+
res.registerFeature(new SemanticTokensFeature(res));
88+
8689
return res;
8790
}

0 commit comments

Comments
 (0)