diff options
author | Aleksey Kladov <[email protected]> | 2019-01-25 16:11:58 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-25 16:11:58 +0000 |
commit | f6adb85b681c23b64cc33197eb67d5d7fcf920f0 (patch) | |
tree | ca0ee39e7f1305019954b3a413a06f9431cb6648 /editors | |
parent | 6df1f71b7d0db209978595dc9be496e7f2ef88ec (diff) |
add gc request
Diffstat (limited to 'editors')
-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); |