diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-10 15:48:19 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-10 15:48:19 +0100 |
commit | cef39c3efb98e5ece42bb72c14d96388380a308c (patch) | |
tree | 1429b2dbc837de84c1ffcc8c31513e640d97080a /editors/code/src | |
parent | f3336509e52187a7a70a8043557a7317872e3a2f (diff) | |
parent | 58c97bdcbf6d7df218028f75373cfc4916043693 (diff) |
Merge #5697
5697: Remove workaround for semantic token flickering r=jonas-schievink a=kjeremy
See: https://github.com/microsoft/vscode-languageserver-node/issues/576#issuecomment-593384479
This has been fixed since vscode 1.44
Co-authored-by: Jeremy Kolb <[email protected]>
Diffstat (limited to 'editors/code/src')
-rw-r--r-- | editors/code/src/client.ts | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts index 18948cb3c..f5db55b8c 100644 --- a/editors/code/src/client.ts +++ b/editors/code/src/client.ts | |||
@@ -4,7 +4,7 @@ import * as ra from '../src/lsp_ext'; | |||
4 | import * as Is from 'vscode-languageclient/lib/utils/is'; | 4 | import * as Is from 'vscode-languageclient/lib/utils/is'; |
5 | 5 | ||
6 | import { CallHierarchyFeature } from 'vscode-languageclient/lib/callHierarchy.proposed'; | 6 | import { CallHierarchyFeature } from 'vscode-languageclient/lib/callHierarchy.proposed'; |
7 | import { SemanticTokensFeature, DocumentSemanticsTokensSignature } from 'vscode-languageclient/lib/semanticTokens.proposed'; | 7 | import { SemanticTokensFeature } from 'vscode-languageclient/lib/semanticTokens.proposed'; |
8 | import { assert } from './util'; | 8 | import { assert } from './util'; |
9 | 9 | ||
10 | function renderCommand(cmd: ra.CommandLink) { | 10 | function renderCommand(cmd: ra.CommandLink) { |
@@ -44,12 +44,6 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient | |||
44 | diagnosticCollectionName: "rustc", | 44 | diagnosticCollectionName: "rustc", |
45 | traceOutputChannel, | 45 | traceOutputChannel, |
46 | middleware: { | 46 | middleware: { |
47 | // Workaround for https://github.com/microsoft/vscode-languageserver-node/issues/576 | ||
48 | async provideDocumentSemanticTokens(document: vscode.TextDocument, token: vscode.CancellationToken, next: DocumentSemanticsTokensSignature) { | ||
49 | const res = await next(document, token); | ||
50 | if (res === undefined) throw new Error('busy'); | ||
51 | return res; | ||
52 | }, | ||
53 | async provideHover(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken, _next: lc.ProvideHoverSignature) { | 47 | async provideHover(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken, _next: lc.ProvideHoverSignature) { |
54 | return client.sendRequest(lc.HoverRequest.type, client.code2ProtocolConverter.asTextDocumentPositionParams(document, position), token).then( | 48 | return client.sendRequest(lc.HoverRequest.type, client.code2ProtocolConverter.asTextDocumentPositionParams(document, position), token).then( |
55 | (result) => { | 49 | (result) => { |
@@ -135,7 +129,7 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient | |||
135 | ); | 129 | ); |
136 | } | 130 | } |
137 | 131 | ||
138 | } as any | 132 | } |
139 | }; | 133 | }; |
140 | 134 | ||
141 | const client = new lc.LanguageClient( | 135 | const client = new lc.LanguageClient( |