aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/main.ts
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-12-30 19:16:07 +0000
committerAleksey Kladov <[email protected]>2019-12-30 19:16:07 +0000
commit6cc55e4c5ce994be284fc4337eed21844c0eef24 (patch)
tree608e6434d077bef30e2f5832cb3d8c10d2831305 /editors/code/src/main.ts
parent7b199f6a4b7a947d1dad6a74b2b88758497d4efa (diff)
status is not a command
Diffstat (limited to 'editors/code/src/main.ts')
-rw-r--r--editors/code/src/main.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index cf0ddfa16..d6c210579 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -3,7 +3,7 @@ import * as lc from 'vscode-languageclient';
3 3
4import * as commands from './commands'; 4import * as commands from './commands';
5import { HintsUpdater } from './inlay_hints'; 5import { HintsUpdater } from './inlay_hints';
6import { StatusDisplay } from './commands/watch_status'; 6import { StatusDisplay } from './status_display';
7import * as events from './events'; 7import * as events from './events';
8import * as notifications from './notifications'; 8import * as notifications from './notifications';
9import { Server } from './server'; 9import { Server } from './server';
@@ -28,10 +28,6 @@ export async function activate(context: vscode.ExtensionContext) {
28 ctx.registerCommand('runSingle', commands.runSingle); 28 ctx.registerCommand('runSingle', commands.runSingle);
29 ctx.registerCommand('showReferences', commands.showReferences); 29 ctx.registerCommand('showReferences', commands.showReferences);
30 30
31 function disposeOnDeactivation(disposable: vscode.Disposable) {
32 context.subscriptions.push(disposable);
33 }
34
35 if (Server.config.enableEnhancedTyping) { 31 if (Server.config.enableEnhancedTyping) {
36 ctx.overrideCommand('type', commands.onEnter); 32 ctx.overrideCommand('type', commands.onEnter);
37 } 33 }
@@ -39,7 +35,11 @@ export async function activate(context: vscode.ExtensionContext) {
39 const watchStatus = new StatusDisplay( 35 const watchStatus = new StatusDisplay(
40 Server.config.cargoWatchOptions.command, 36 Server.config.cargoWatchOptions.command,
41 ); 37 );
42 disposeOnDeactivation(watchStatus); 38 ctx.pushCleanup(watchStatus);
39
40 function disposeOnDeactivation(disposable: vscode.Disposable) {
41 context.subscriptions.push(disposable);
42 }
43 43
44 // Notifications are events triggered by the language server 44 // Notifications are events triggered by the language server
45 const allNotifications: [string, lc.GenericNotificationHandler][] = [ 45 const allNotifications: [string, lc.GenericNotificationHandler][] = [