aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-31 20:14:02 +0000
committerGitHub <[email protected]>2019-12-31 20:14:02 +0000
commitd5a1a5e6147ffdcd655ea082161bc63ac2974f2e (patch)
tree30d49c161e984f2f13c40f88fecf7ebcdc7e291a /editors/code/src
parentc3a86325daabcabcff72d9eb00040c55ca90a483 (diff)
parentef24721640c4722ce47d491a6bf5dd0760da57bd (diff)
Merge #2715
2715: Fixes to progress display r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/main.ts21
-rw-r--r--editors/code/src/status_display.ts8
2 files changed, 12 insertions, 17 deletions
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index 51dedd5ef..430ad31b4 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -11,17 +11,6 @@ let ctx!: Ctx;
11export async function activate(context: vscode.ExtensionContext) { 11export async function activate(context: vscode.ExtensionContext) {
12 ctx = new Ctx(context); 12 ctx = new Ctx(context);
13 13
14 // Note: we try to start the server before we register various commands, so
15 // that it registers its `onDidChangeDocument` handler before us.
16 //
17 // This a horribly, horribly wrong way to deal with this problem.
18 try {
19 await ctx.restartServer();
20 } catch (e) {
21 vscode.window.showErrorMessage(e.message);
22 }
23
24
25 // Commands which invokes manually via command pallet, shortcut, etc. 14 // Commands which invokes manually via command pallet, shortcut, etc.
26 ctx.registerCommand('analyzerStatus', commands.analyzerStatus); 15 ctx.registerCommand('analyzerStatus', commands.analyzerStatus);
27 ctx.registerCommand('collectGarbage', commands.collectGarbage); 16 ctx.registerCommand('collectGarbage', commands.collectGarbage);
@@ -42,7 +31,17 @@ export async function activate(context: vscode.ExtensionContext) {
42 ctx.overrideCommand('type', commands.onEnter); 31 ctx.overrideCommand('type', commands.onEnter);
43 } 32 }
44 activateStatusDisplay(ctx); 33 activateStatusDisplay(ctx);
34
45 activateHighlighting(ctx); 35 activateHighlighting(ctx);
36 // Note: we try to start the server before we activate type hints so that it
37 // registers its `onDidChangeDocument` handler before us.
38 //
39 // This a horribly, horribly wrong way to deal with this problem.
40 try {
41 await ctx.restartServer();
42 } catch (e) {
43 vscode.window.showErrorMessage(e.message);
44 }
46 activateInlayHints(ctx); 45 activateInlayHints(ctx);
47} 46}
48 47
diff --git a/editors/code/src/status_display.ts b/editors/code/src/status_display.ts
index 08cdc8bdf..371a2f3bb 100644
--- a/editors/code/src/status_display.ts
+++ b/editors/code/src/status_display.ts
@@ -36,13 +36,9 @@ class StatusDisplay implements vscode.Disposable {
36 this.timer || 36 this.timer ||
37 setInterval(() => { 37 setInterval(() => {
38 if (this.packageName) { 38 if (this.packageName) {
39 this.statusBarItem!.text = `cargo ${this.command} [${ 39 this.statusBarItem!.text = `${this.frame()} cargo ${this.command} [${this.packageName}]`;
40 this.packageName
41 }] ${this.frame()}`;
42 } else { 40 } else {
43 this.statusBarItem!.text = `cargo ${ 41 this.statusBarItem!.text = `${this.frame()} cargo ${this.command}`;
44 this.command
45 } ${this.frame()}`;
46 } 42 }
47 }, 300); 43 }, 300);
48 44