mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Remove workaround for semantic token flickering
See: https://github.com/microsoft/vscode-languageserver-node/issues/576#issuecomment-593384479 This has been fixed since vscode 1.44
This commit is contained in:
parent
9995e79cce
commit
7252babc13
1 changed files with 1 additions and 7 deletions
|
@ -4,7 +4,7 @@ import * as ra from '../src/lsp_ext';
|
||||||
import * as Is from 'vscode-languageclient/lib/utils/is';
|
import * as Is from 'vscode-languageclient/lib/utils/is';
|
||||||
|
|
||||||
import { CallHierarchyFeature } from 'vscode-languageclient/lib/callHierarchy.proposed';
|
import { CallHierarchyFeature } from 'vscode-languageclient/lib/callHierarchy.proposed';
|
||||||
import { SemanticTokensFeature, DocumentSemanticsTokensSignature } from 'vscode-languageclient/lib/semanticTokens.proposed';
|
import { SemanticTokensFeature } from 'vscode-languageclient/lib/semanticTokens.proposed';
|
||||||
import { assert } from './util';
|
import { assert } from './util';
|
||||||
|
|
||||||
function renderCommand(cmd: ra.CommandLink) {
|
function renderCommand(cmd: ra.CommandLink) {
|
||||||
|
@ -44,12 +44,6 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient
|
||||||
diagnosticCollectionName: "rustc",
|
diagnosticCollectionName: "rustc",
|
||||||
traceOutputChannel,
|
traceOutputChannel,
|
||||||
middleware: {
|
middleware: {
|
||||||
// Workaround for https://github.com/microsoft/vscode-languageserver-node/issues/576
|
|
||||||
async provideDocumentSemanticTokens(document: vscode.TextDocument, token: vscode.CancellationToken, next: DocumentSemanticsTokensSignature) {
|
|
||||||
const res = await next(document, token);
|
|
||||||
if (res === undefined) throw new Error('busy');
|
|
||||||
return res;
|
|
||||||
},
|
|
||||||
async provideHover(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken, _next: lc.ProvideHoverSignature) {
|
async provideHover(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken, _next: lc.ProvideHoverSignature) {
|
||||||
return client.sendRequest(lc.HoverRequest.type, client.code2ProtocolConverter.asTextDocumentPositionParams(document, position), token).then(
|
return client.sendRequest(lc.HoverRequest.type, client.code2ProtocolConverter.asTextDocumentPositionParams(document, position), token).then(
|
||||||
(result) => {
|
(result) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue