Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions packages/core/src/shared/lsp/lspResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/shared/utilities/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading