Simplify TS reload logic

Fixes #3164
This commit is contained in:
Aleksey Kladov 2020-02-17 12:17:01 +01:00
parent fcf15cc05a
commit dcdbbddd16
6 changed files with 51 additions and 23 deletions

View file

@ -9,7 +9,7 @@ const spinnerFrames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '
export function activateStatusDisplay(ctx: Ctx) {
const statusDisplay = new StatusDisplay(ctx.config.cargoWatchOptions.command);
ctx.pushCleanup(statusDisplay);
ctx.onDidRestart(client => ctx.pushCleanup(client.onProgress(
ctx.onStart(client => ctx.pushCleanup(client.onProgress(
WorkDoneProgress.type,
'rustAnalyzer/cargoWatcher',
params => statusDisplay.handleProgressNotification(params)