diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-22 22:25:22 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-22 22:25:22 +0000 |
commit | f90783fc5309e1835b22aa65d071efb9cf3eb9df (patch) | |
tree | f60d21521d667e46bb7596c74b0064f3650798e2 /editors/code/src/commands/analyzer_status.ts | |
parent | e08df3219d7a06b1e38c632e7f13967fb540769b (diff) | |
parent | c0dba92b7fec667bda1c1a1af258ef37ee8cbf54 (diff) |
Merge #602
602: add status command r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'editors/code/src/commands/analyzer_status.ts')
-rw-r--r-- | editors/code/src/commands/analyzer_status.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/editors/code/src/commands/analyzer_status.ts b/editors/code/src/commands/analyzer_status.ts new file mode 100644 index 000000000..5c56b9c4c --- /dev/null +++ b/editors/code/src/commands/analyzer_status.ts | |||
@@ -0,0 +1,12 @@ | |||
1 | import * as vscode from 'vscode'; | ||
2 | import { Server } from '../server'; | ||
3 | |||
4 | // Shows status of rust-analyzer (for debugging) | ||
5 | export async function handle() { | ||
6 | const status = await Server.client.sendRequest<string>( | ||
7 | 'ra/analyzerStatus', | ||
8 | null | ||
9 | ); | ||
10 | const doc = await vscode.workspace.openTextDocument({ content: status }); | ||
11 | await vscode.window.showTextDocument(doc, vscode.ViewColumn.Two); | ||
12 | } | ||