diff options
Diffstat (limited to 'editors/code/src/extension.ts')
-rw-r--r-- | editors/code/src/extension.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/editors/code/src/extension.ts b/editors/code/src/extension.ts index 72a4d4bf2..1507cb26e 100644 --- a/editors/code/src/extension.ts +++ b/editors/code/src/extension.ts | |||
@@ -8,6 +8,7 @@ import { SyntaxTreeContentProvider } from './commands/syntaxTree'; | |||
8 | import * as events from './events'; | 8 | import * as events from './events'; |
9 | import * as notifications from './notifications'; | 9 | import * as notifications from './notifications'; |
10 | import { Server } from './server'; | 10 | import { Server } from './server'; |
11 | import { StatusDisplay } from './commands/watch_status'; | ||
11 | 12 | ||
12 | export async function activate(context: vscode.ExtensionContext) { | 13 | export async function activate(context: vscode.ExtensionContext) { |
13 | function disposeOnDeactivation(disposable: vscode.Disposable) { | 14 | function disposeOnDeactivation(disposable: vscode.Disposable) { |
@@ -83,6 +84,9 @@ export async function activate(context: vscode.ExtensionContext) { | |||
83 | overrideCommand('type', commands.onEnter.handle); | 84 | overrideCommand('type', commands.onEnter.handle); |
84 | } | 85 | } |
85 | 86 | ||
87 | const watchStatus = new StatusDisplay(Server.config.cargoCheckOptions.command || 'check'); | ||
88 | disposeOnDeactivation(watchStatus); | ||
89 | |||
86 | // Notifications are events triggered by the language server | 90 | // Notifications are events triggered by the language server |
87 | const allNotifications: Iterable<[ | 91 | const allNotifications: Iterable<[ |
88 | string, | 92 | string, |
@@ -92,6 +96,10 @@ export async function activate(context: vscode.ExtensionContext) { | |||
92 | 'rust-analyzer/publishDecorations', | 96 | 'rust-analyzer/publishDecorations', |
93 | notifications.publishDecorations.handle, | 97 | notifications.publishDecorations.handle, |
94 | ], | 98 | ], |
99 | [ | ||
100 | '$/progress', | ||
101 | (params) => watchStatus.handleProgressNotification(params), | ||
102 | ] | ||
95 | ]; | 103 | ]; |
96 | const syntaxTreeContentProvider = new SyntaxTreeContentProvider(); | 104 | const syntaxTreeContentProvider = new SyntaxTreeContentProvider(); |
97 | const expandMacroContentProvider = new ExpandMacroContentProvider(); | 105 | const expandMacroContentProvider = new ExpandMacroContentProvider(); |