diff options
Diffstat (limited to 'editors/code')
-rw-r--r-- | editors/code/package.json | 4 | ||||
-rw-r--r-- | editors/code/src/extension.ts | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index 3e07032c7..86683eb73 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -98,6 +98,10 @@ | |||
98 | { | 98 | { |
99 | "command": "ra-lsp.analyzerStatus", | 99 | "command": "ra-lsp.analyzerStatus", |
100 | "title": "Status of rust-analyzer (debug)" | 100 | "title": "Status of rust-analyzer (debug)" |
101 | }, | ||
102 | { | ||
103 | "command": "ra-lsp.collectGarbage", | ||
104 | "title": "Run rust-analyzer's GC" | ||
101 | } | 105 | } |
102 | ], | 106 | ], |
103 | "keybindings": [ | 107 | "keybindings": [ |
diff --git a/editors/code/src/extension.ts b/editors/code/src/extension.ts index 3af95c599..dc7b01403 100644 --- a/editors/code/src/extension.ts +++ b/editors/code/src/extension.ts | |||
@@ -49,6 +49,9 @@ export function activate(context: vscode.ExtensionContext) { | |||
49 | 'ra-lsp.analyzerStatus', | 49 | 'ra-lsp.analyzerStatus', |
50 | commands.analyzerStatus.makeCommand(context) | 50 | commands.analyzerStatus.makeCommand(context) |
51 | ); | 51 | ); |
52 | registerCommand('ra-lsp.collectGarbage', () => | ||
53 | Server.client.sendRequest<null>('ra/collectGarbage', null) | ||
54 | ); | ||
52 | registerCommand('ra-lsp.syntaxTree', commands.syntaxTree.handle); | 55 | registerCommand('ra-lsp.syntaxTree', commands.syntaxTree.handle); |
53 | registerCommand('ra-lsp.extendSelection', commands.extendSelection.handle); | 56 | registerCommand('ra-lsp.extendSelection', commands.extendSelection.handle); |
54 | registerCommand('ra-lsp.matchingBrace', commands.matchingBrace.handle); | 57 | registerCommand('ra-lsp.matchingBrace', commands.matchingBrace.handle); |