Skip to content

Commit 7c1fb6c

Browse files
bors[bot]kjeremy
andauthored
Merge #3137
3137: Do not register all proposed features r=matklad a=kjeremy Instead only opt-in to CallHierarchy since it has a vscode API but LSP support is still proposed. Discovered while working on SemanticTokens which does not have a vscode API and is still in the proposed state. Somehow enabling it would crash the language server. See microsoft/vscode-languageserver-node#572 Co-authored-by: kjeremy <kjeremy@gmail.com>
2 parents bb65b59 + 7a832cd commit 7c1fb6c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

editors/code/src/client.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as lc from 'vscode-languageclient';
33
import { window, workspace } from 'vscode';
44
import { Config } from './config';
55
import { ensureLanguageServerBinary } from './installation/language_server';
6+
import { CallHierarchyFeature } from 'vscode-languageclient/lib/callHierarchy.proposed';
67

78
export async function createClient(config: Config): Promise<null | lc.LanguageClient> {
89
// '.' Is the fallback if no folder is open
@@ -78,6 +79,10 @@ export async function createClient(config: Config): Promise<null | lc.LanguageCl
7879
}
7980
},
8081
};
81-
res.registerProposedFeatures();
82+
83+
// To turn on all proposed features use: res.registerProposedFeatures();
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.
86+
res.registerFeature(new CallHierarchyFeature(res));
8287
return res;
8388
}

0 commit comments

Comments
 (0)