aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-22 21:15:03 +0000
committerAleksey Kladov <[email protected]>2019-01-22 22:24:53 +0000
commit0ba7e2eaebf335dbc31b5d6dbc9c354737c7fe54 (patch)
tree9adf247619c28ed5e7cdeee118897231d8f2320c /editors/code/src/commands
parente08df3219d7a06b1e38c632e7f13967fb540769b (diff)
ad status command
Diffstat (limited to 'editors/code/src/commands')
-rw-r--r--editors/code/src/commands/analyzer_status.ts12
-rw-r--r--editors/code/src/commands/index.ts2
2 files changed, 14 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 @@
1import * as vscode from 'vscode';
2import { Server } from '../server';
3
4// Shows status of rust-analyzer (for debugging)
5export 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}
diff --git a/editors/code/src/commands/index.ts b/editors/code/src/commands/index.ts
index 33e2b34a2..f36c4b040 100644
--- a/editors/code/src/commands/index.ts
+++ b/editors/code/src/commands/index.ts
@@ -1,3 +1,4 @@
1import * as analyzerStatus from './analyzer_status';
1import * as applySourceChange from './apply_source_change'; 2import * as applySourceChange from './apply_source_change';
2import * as extendSelection from './extend_selection'; 3import * as extendSelection from './extend_selection';
3import * as joinLines from './join_lines'; 4import * as joinLines from './join_lines';
@@ -8,6 +9,7 @@ import * as runnables from './runnables';
8import * as syntaxTree from './syntaxTree'; 9import * as syntaxTree from './syntaxTree';
9 10
10export { 11export {
12 analyzerStatus,
11 applySourceChange, 13 applySourceChange,
12 extendSelection, 14 extendSelection,
13 joinLines, 15 joinLines,