From f6adb85b681c23b64cc33197eb67d5d7fcf920f0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 25 Jan 2019 19:11:58 +0300 Subject: add gc request --- editors/code/package.json | 4 ++++ editors/code/src/extension.ts | 3 +++ 2 files changed, 7 insertions(+) (limited to 'editors/code') 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 @@ { "command": "ra-lsp.analyzerStatus", "title": "Status of rust-analyzer (debug)" + }, + { + "command": "ra-lsp.collectGarbage", + "title": "Run rust-analyzer's GC" } ], "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) { 'ra-lsp.analyzerStatus', commands.analyzerStatus.makeCommand(context) ); + registerCommand('ra-lsp.collectGarbage', () => + Server.client.sendRequest('ra/collectGarbage', null) + ); registerCommand('ra-lsp.syntaxTree', commands.syntaxTree.handle); registerCommand('ra-lsp.extendSelection', commands.extendSelection.handle); registerCommand('ra-lsp.matchingBrace', commands.matchingBrace.handle); -- cgit v1.2.3