This will crash the extension on stable and insiders without the "--enable-proposed-api matklad.rust-analyzer" command line switch.
"engines": {
"vscode": "^1.42.0"
},
+ "enableProposedApi": true,
"scripts": {
"vscode:prepublish": "tsc && rollup -c",
"package": "vsce package -o rust-analyzer.vsix",
import { Config } from './config';
import { CallHierarchyFeature } from 'vscode-languageclient/lib/callHierarchy.proposed';
+import { SemanticTokensFeature } from 'vscode-languageclient/lib/semanticTokens.proposed';
export async function createClient(config: Config, serverPath: string): Promise<lc.LanguageClient> {
// '.' Is the fallback if no folder is open
// 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));
+
return res;
}