diff --git a/packages/core/src/shared/lsp/lspResolver.ts b/packages/core/src/shared/lsp/lspResolver.ts index 70f66cafd14..ba51030e348 100644 --- a/packages/core/src/shared/lsp/lspResolver.ts +++ b/packages/core/src/shared/lsp/lspResolver.ts @@ -13,9 +13,10 @@ import { TargetContent, logger, LspResult, LspVersion, Manifest } from './types' import { createHash } from '../crypto' import { lspSetupStage, StageResolver, tryStageResolvers } from './utils/setupStage' import { HttpResourceFetcher } from '../resourcefetcher/httpResourceFetcher' -import { showMessageWithCancel } from '../../shared/utilities/messages' +import { showProgressWithTimeout } from '../../shared/utilities/messages' import { Timeout } from '../utilities/timeoutUtils' import { oneMinute } from '../datetime' +import vscode from 'vscode' // max timeout for downloading remote LSP assets. Some asserts are large (100+ MB) so this needs to be large for slow connections. // Since the user can cancel this one we can let it run very long. @@ -106,7 +107,15 @@ export class LanguageServerResolver { */ private async showDownloadProgress() { const timeout = new Timeout(remoteDownloadTimeout) - await showMessageWithCancel(`Downloading '${this.lsName}' language server`, timeout) + void showProgressWithTimeout( + { + title: `Downloading '${this.lsName}' language server`, + location: vscode.ProgressLocation.Notification, + cancellable: false, + }, + timeout, + 0 + ) return timeout } diff --git a/packages/core/src/shared/utilities/messages.ts b/packages/core/src/shared/utilities/messages.ts index fe2b08e42cf..26fd745c8d6 100644 --- a/packages/core/src/shared/utilities/messages.ts +++ b/packages/core/src/shared/utilities/messages.ts @@ -236,7 +236,7 @@ export function showOutputMessage(message: string, outputChannel: vscode.OutputC * * @see showMessageWithCancel for an example usage */ -async function showProgressWithTimeout( +export async function showProgressWithTimeout( options: vscode.ProgressOptions, timeout: Timeout, showAfterMs: number