diff options
Diffstat (limited to 'editors/code/src/commands')
-rw-r--r-- | editors/code/src/commands/analyzer_status.ts | 12 | ||||
-rw-r--r-- | editors/code/src/commands/index.ts | 2 |
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 @@ | |||
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 | } | ||
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 @@ | |||
1 | import * as analyzerStatus from './analyzer_status'; | ||
1 | import * as applySourceChange from './apply_source_change'; | 2 | import * as applySourceChange from './apply_source_change'; |
2 | import * as extendSelection from './extend_selection'; | 3 | import * as extendSelection from './extend_selection'; |
3 | import * as joinLines from './join_lines'; | 4 | import * as joinLines from './join_lines'; |
@@ -8,6 +9,7 @@ import * as runnables from './runnables'; | |||
8 | import * as syntaxTree from './syntaxTree'; | 9 | import * as syntaxTree from './syntaxTree'; |
9 | 10 | ||
10 | export { | 11 | export { |
12 | analyzerStatus, | ||
11 | applySourceChange, | 13 | applySourceChange, |
12 | extendSelection, | 14 | extendSelection, |
13 | joinLines, | 15 | joinLines, |