Skip to content

Commit cef39c3

Browse files
bors[bot]kjeremy
andauthored
Merge #5697
5697: Remove workaround for semantic token flickering r=jonas-schievink a=kjeremy See: microsoft/vscode-languageserver-node#576 (comment) This has been fixed since vscode 1.44 Co-authored-by: Jeremy Kolb <[email protected]>
2 parents f333650 + 58c97bd commit cef39c3

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

editors/code/src/client.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as ra from '../src/lsp_ext';
44
import * as Is from 'vscode-languageclient/lib/utils/is';
55

66
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';
88
import { assert } from './util';
99

1010
function renderCommand(cmd: ra.CommandLink) {
@@ -44,12 +44,6 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient
4444
diagnosticCollectionName: "rustc",
4545
traceOutputChannel,
4646
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-
},
5347
async provideHover(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken, _next: lc.ProvideHoverSignature) {
5448
return client.sendRequest(lc.HoverRequest.type, client.code2ProtocolConverter.asTextDocumentPositionParams(document, position), token).then(
5549
(result) => {
@@ -135,7 +129,7 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient
135129
);
136130
}
137131

138-
} as any
132+
}
139133
};
140134

141135
const client = new lc.LanguageClient(

0 commit comments

Comments
 (0)