aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/status_display.ts
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-02-17 12:40:20 +0000
committerAleksey Kladov <[email protected]>2020-02-17 12:40:47 +0000
commitd24e612106867c4bb6a1e59bf99aabfb7bc27823 (patch)
treedf40b6265f303b8fba5f804a7f7ff370e844dea0 /editors/code/src/status_display.ts
parentdcdbbddd1630a4ed01906c2aff0e2b65ed99a591 (diff)
Simplify startup
Diffstat (limited to 'editors/code/src/status_display.ts')
-rw-r--r--editors/code/src/status_display.ts13
1 files changed, 8 insertions, 5 deletions
diff --git a/editors/code/src/status_display.ts b/editors/code/src/status_display.ts
index 326b5217b..ed0d82166 100644
--- a/editors/code/src/status_display.ts
+++ b/editors/code/src/status_display.ts
@@ -9,11 +9,14 @@ const spinnerFrames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '
9export function activateStatusDisplay(ctx: Ctx) { 9export function activateStatusDisplay(ctx: Ctx) {
10 const statusDisplay = new StatusDisplay(ctx.config.cargoWatchOptions.command); 10 const statusDisplay = new StatusDisplay(ctx.config.cargoWatchOptions.command);
11 ctx.pushCleanup(statusDisplay); 11 ctx.pushCleanup(statusDisplay);
12 ctx.onStart(client => ctx.pushCleanup(client.onProgress( 12 const client = ctx.client;
13 WorkDoneProgress.type, 13 if (client != null) {
14 'rustAnalyzer/cargoWatcher', 14 ctx.pushCleanup(client.onProgress(
15 params => statusDisplay.handleProgressNotification(params) 15 WorkDoneProgress.type,
16 ))); 16 'rustAnalyzer/cargoWatcher',
17 params => statusDisplay.handleProgressNotification(params)
18 ))
19 }
17} 20}
18 21
19class StatusDisplay implements Disposable { 22class StatusDisplay implements Disposable {