]> git.lizzy.rs Git - rust.git/commitdiff
Re-format VSCode extension changes
authorEmil Lauridsen <mine809@gmail.com>
Wed, 25 Dec 2019 18:10:30 +0000 (19:10 +0100)
committerEmil Lauridsen <mine809@gmail.com>
Wed, 25 Dec 2019 18:10:30 +0000 (19:10 +0100)
editors/code/src/commands/watch_status.ts
editors/code/src/extension.ts

index 2404c3f164df62bdac20053b8d90c4b846158c2e..10787b5101f75211a1eecad05772bd0809fc7439 100644 (file)
@@ -59,23 +59,22 @@ export class StatusDisplay implements vscode.Disposable {
 
     public handleProgressNotification(params: ProgressParams) {
         const { token, value } = params;
-        if (token !== "rustAnalyzer/cargoWatcher") {
+        if (token !== 'rustAnalyzer/cargoWatcher') {
             return;
         }
 
-        console.log("Got progress notification", token, value)
         switch (value.kind) {
-            case "begin":
+            case 'begin':
                 this.show();
                 break;
 
-            case "report":
+            case 'report':
                 if (value.message) {
                     this.packageName = value.message;
                 }
                 break;
 
-            case "end":
+            case 'end':
                 this.hide();
                 break;
         }
@@ -88,19 +87,19 @@ export class StatusDisplay implements vscode.Disposable {
 
 // FIXME: Replace this once vscode-languageclient is updated to LSP 3.15
 interface ProgressParams {
-    token: string
-    value: WorkDoneProgress
+    token: string;
+    value: WorkDoneProgress;
 }
 
 enum WorkDoneProgressKind {
-    Begin = "begin",
-    Report = "report",
-    End = "end"
+    Begin = 'begin',
+    Report = 'report',
+    End = 'end',
 }
 
 interface WorkDoneProgress {
-    kind: WorkDoneProgressKind,
-    message?: string
-    cancelable?: boolean
-    percentage?: string
-}
\ No newline at end of file
+    kind: WorkDoneProgressKind;
+    message?: string;
+    cancelable?: boolean;
+    percentage?: string;
+}
index 1507cb26eac48bfb208ae7595f4225ab7fea9f2d..36163b6bb612b2b45bc1cd49f4e85b03ba09a8f5 100644 (file)
@@ -5,10 +5,10 @@ import * as commands from './commands';
 import { ExpandMacroContentProvider } from './commands/expand_macro';
 import { HintsUpdater } from './commands/inlay_hints';
 import { SyntaxTreeContentProvider } from './commands/syntaxTree';
+import { StatusDisplay } from './commands/watch_status';
 import * as events from './events';
 import * as notifications from './notifications';
 import { Server } from './server';
-import { StatusDisplay } from './commands/watch_status';
 
 export async function activate(context: vscode.ExtensionContext) {
     function disposeOnDeactivation(disposable: vscode.Disposable) {
@@ -84,7 +84,9 @@ export async function activate(context: vscode.ExtensionContext) {
         overrideCommand('type', commands.onEnter.handle);
     }
 
-    const watchStatus = new StatusDisplay(Server.config.cargoCheckOptions.command || 'check');
+    const watchStatus = new StatusDisplay(
+        Server.config.cargoCheckOptions.command || 'check',
+    );
     disposeOnDeactivation(watchStatus);
 
     // Notifications are events triggered by the language server
@@ -98,8 +100,8 @@ export async function activate(context: vscode.ExtensionContext) {
         ],
         [
             '$/progress',
-            (params) => watchStatus.handleProgressNotification(params),
-        ]
+            params => watchStatus.handleProgressNotification(params),
+        ],
     ];
     const syntaxTreeContentProvider = new SyntaxTreeContentProvider();
     const expandMacroContentProvider = new ExpandMacroContentProvider();