diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-14 16:50:06 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-14 16:50:06 +0000 |
commit | 7c1fb6caa5441254ff3157cbdf69a3cbe49ff8bc (patch) | |
tree | 1270a24402330e3ab1a33cc3dae17d6c2308a150 /editors | |
parent | bb65b59737bb5bcf0578ba8a9654d418ce4876c8 (diff) | |
parent | 7a832cdf6b9efef2e6c45f56a4385adddd493ea6 (diff) |
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 https://github.com/microsoft/vscode-languageserver-node/issues/572
Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'editors')
-rw-r--r-- | editors/code/src/client.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts index 2e3d4aba2..d2759969b 100644 --- a/editors/code/src/client.ts +++ b/editors/code/src/client.ts | |||
@@ -3,6 +3,7 @@ import * as lc from 'vscode-languageclient'; | |||
3 | import { window, workspace } from 'vscode'; | 3 | import { window, workspace } from 'vscode'; |
4 | import { Config } from './config'; | 4 | import { Config } from './config'; |
5 | import { ensureLanguageServerBinary } from './installation/language_server'; | 5 | import { ensureLanguageServerBinary } from './installation/language_server'; |
6 | import { CallHierarchyFeature } from 'vscode-languageclient/lib/callHierarchy.proposed'; | ||
6 | 7 | ||
7 | export async function createClient(config: Config): Promise<null | lc.LanguageClient> { | 8 | export async function createClient(config: Config): Promise<null | lc.LanguageClient> { |
8 | // '.' Is the fallback if no folder is open | 9 | // '.' Is the fallback if no folder is open |
@@ -78,6 +79,10 @@ export async function createClient(config: Config): Promise<null | lc.LanguageCl | |||
78 | } | 79 | } |
79 | }, | 80 | }, |
80 | }; | 81 | }; |
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)); | ||
82 | return res; | 87 | return res; |
83 | } | 88 | } |