From d06005c06258052982c967a900ec67d9ecc3c196 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 26 Oct 2022 15:04:08 -0700 Subject: [PATCH] Fix LSP ready status check --- src/omnisharp/engines/LspEngine.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/omnisharp/engines/LspEngine.ts b/src/omnisharp/engines/LspEngine.ts index 41b97abca..05e48fdeb 100644 --- a/src/omnisharp/engines/LspEngine.ts +++ b/src/omnisharp/engines/LspEngine.ts @@ -27,7 +27,7 @@ import { Events, OmniSharpServer } from '../server'; import { IEngine } from './IEngine'; import { PlatformInformation } from '../../platform'; import { IHostExecutableResolver } from '../../constants/IHostExecutableResolver'; -import { Command, DynamicFeature, LanguageClientOptions, RequestType0, StaticFeature, Trace } from 'vscode-languageclient'; +import { Command, DynamicFeature, LanguageClientOptions, RequestType, StaticFeature, Trace } from 'vscode-languageclient'; import { LanguageClient, ServerOptions } from 'vscode-languageclient/node'; import { SelectionRangeFeature } from 'vscode-languageclient/lib/common/selectionRange'; import { ColorProviderFeature } from 'vscode-languageclient/lib/common/colorProvider'; @@ -296,10 +296,10 @@ export class LspEngine implements IEngine { return this._initializeTask; async function waitForReady(client: LanguageClient) { - const readyStatus = new RequestType0( + const statusRequest = new RequestType<{}, boolean, void>( 'o#/checkreadystatus' ); - while (!(await client.sendRequest(readyStatus))) { + while (!await client.sendRequest(statusRequest, {})) { await new Promise((r) => setTimeout(r, 100)); } }