aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands
diff options
context:
space:
mode:
authorEmil Lauridsen <[email protected]>2019-12-25 18:10:30 +0000
committerEmil Lauridsen <[email protected]>2019-12-25 18:10:30 +0000
commitb9c10ed97f22d665b75895a387c633dfa412ed2b (patch)
tree1c1353d5afd896170389b17a82662528673785c9 /editors/code/src/commands
parent178c23f50549298aad0dc0f098f8ed510a57f9d6 (diff)
Re-format VSCode extension changes
Diffstat (limited to 'editors/code/src/commands')
-rw-r--r--editors/code/src/commands/watch_status.ts29
1 files changed, 14 insertions, 15 deletions
diff --git a/editors/code/src/commands/watch_status.ts b/editors/code/src/commands/watch_status.ts
index 2404c3f16..10787b510 100644
--- a/editors/code/src/commands/watch_status.ts
+++ b/editors/code/src/commands/watch_status.ts
@@ -59,23 +59,22 @@ export class StatusDisplay implements vscode.Disposable {
59 59
60 public handleProgressNotification(params: ProgressParams) { 60 public handleProgressNotification(params: ProgressParams) {
61 const { token, value } = params; 61 const { token, value } = params;
62 if (token !== "rustAnalyzer/cargoWatcher") { 62 if (token !== 'rustAnalyzer/cargoWatcher') {
63 return; 63 return;
64 } 64 }
65 65
66 console.log("Got progress notification", token, value)
67 switch (value.kind) { 66 switch (value.kind) {
68 case "begin": 67 case 'begin':
69 this.show(); 68 this.show();
70 break; 69 break;
71 70
72 case "report": 71 case 'report':
73 if (value.message) { 72 if (value.message) {
74 this.packageName = value.message; 73 this.packageName = value.message;
75 } 74 }
76 break; 75 break;
77 76
78 case "end": 77 case 'end':
79 this.hide(); 78 this.hide();
80 break; 79 break;
81 } 80 }
@@ -88,19 +87,19 @@ export class StatusDisplay implements vscode.Disposable {
88 87
89// FIXME: Replace this once vscode-languageclient is updated to LSP 3.15 88// FIXME: Replace this once vscode-languageclient is updated to LSP 3.15
90interface ProgressParams { 89interface ProgressParams {
91 token: string 90 token: string;
92 value: WorkDoneProgress 91 value: WorkDoneProgress;
93} 92}
94 93
95enum WorkDoneProgressKind { 94enum WorkDoneProgressKind {
96 Begin = "begin", 95 Begin = 'begin',
97 Report = "report", 96 Report = 'report',
98 End = "end" 97 End = 'end',
99} 98}
100 99
101interface WorkDoneProgress { 100interface WorkDoneProgress {
102 kind: WorkDoneProgressKind, 101 kind: WorkDoneProgressKind;
103 message?: string 102 message?: string;
104 cancelable?: boolean 103 cancelable?: boolean;
105 percentage?: string 104 percentage?: string;
106} \ No newline at end of file 105}