diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-12-30 14:26:07 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-30 14:26:07 +0000 |
commit | 28ef2ea4f98e7e5c4e1df73e2e120dea7d279357 (patch) | |
tree | 12032141b5a113aca0a05ce2ebb3da55ce87f7f9 /editors/code/src/main.ts | |
parent | 9cad88dd95773f9ede6233fd7d0f3a076c5cda61 (diff) | |
parent | 5dd9edaeafde3d5b5975cefe8dc1a65ccd9cd59f (diff) |
Merge #2687
2687: Move matching brace to new Ctx r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'editors/code/src/main.ts')
-rw-r--r-- | editors/code/src/main.ts | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index 1da10ebd0..a4149a059 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts | |||
@@ -9,8 +9,16 @@ import { StatusDisplay } from './commands/watch_status'; | |||
9 | import * as events from './events'; | 9 | import * as events from './events'; |
10 | import * as notifications from './notifications'; | 10 | import * as notifications from './notifications'; |
11 | import { Server } from './server'; | 11 | import { Server } from './server'; |
12 | import { Ctx } from './ctx'; | ||
13 | |||
14 | let ctx!: Ctx; | ||
12 | 15 | ||
13 | export async function activate(context: vscode.ExtensionContext) { | 16 | export async function activate(context: vscode.ExtensionContext) { |
17 | ctx = new Ctx(context); | ||
18 | ctx.registerCommand('analyzerStatus', commands.analyzerStatus); | ||
19 | ctx.registerCommand('collectGarbage', commands.collectGarbage); | ||
20 | ctx.registerCommand('matchingBrace', commands.matchingBrace); | ||
21 | |||
14 | function disposeOnDeactivation(disposable: vscode.Disposable) { | 22 | function disposeOnDeactivation(disposable: vscode.Disposable) { |
15 | context.subscriptions.push(disposable); | 23 | context.subscriptions.push(disposable); |
16 | } | 24 | } |
@@ -48,17 +56,6 @@ export async function activate(context: vscode.ExtensionContext) { | |||
48 | } | 56 | } |
49 | 57 | ||
50 | // Commands are requests from vscode to the language server | 58 | // Commands are requests from vscode to the language server |
51 | registerCommand( | ||
52 | 'rust-analyzer.analyzerStatus', | ||
53 | commands.analyzerStatus.makeCommand(context), | ||
54 | ); | ||
55 | registerCommand('rust-analyzer.collectGarbage', () => | ||
56 | Server.client.sendRequest<null>('rust-analyzer/collectGarbage', null), | ||
57 | ); | ||
58 | registerCommand( | ||
59 | 'rust-analyzer.matchingBrace', | ||
60 | commands.matchingBrace.handle, | ||
61 | ); | ||
62 | registerCommand('rust-analyzer.joinLines', commands.joinLines.handle); | 59 | registerCommand('rust-analyzer.joinLines', commands.joinLines.handle); |
63 | registerCommand('rust-analyzer.parentModule', commands.parentModule.handle); | 60 | registerCommand('rust-analyzer.parentModule', commands.parentModule.handle); |
64 | registerCommand('rust-analyzer.run', commands.runnables.handle); | 61 | registerCommand('rust-analyzer.run', commands.runnables.handle); |