diff options
Diffstat (limited to 'editors/code/src/commands/syntaxTree.ts')
-rw-r--r-- | editors/code/src/commands/syntaxTree.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editors/code/src/commands/syntaxTree.ts b/editors/code/src/commands/syntaxTree.ts index 2f50fe14b..89a80550c 100644 --- a/editors/code/src/commands/syntaxTree.ts +++ b/editors/code/src/commands/syntaxTree.ts | |||
@@ -11,7 +11,7 @@ export class SyntaxTreeContentProvider | |||
11 | public syntaxTree: string = 'Not available'; | 11 | public syntaxTree: string = 'Not available'; |
12 | 12 | ||
13 | public provideTextDocumentContent( | 13 | public provideTextDocumentContent( |
14 | uri: vscode.Uri | 14 | uri: vscode.Uri, |
15 | ): vscode.ProviderResult<string> { | 15 | ): vscode.ProviderResult<string> { |
16 | const editor = vscode.window.activeTextEditor; | 16 | const editor = vscode.window.activeTextEditor; |
17 | if (editor == null) { | 17 | if (editor == null) { |
@@ -25,17 +25,17 @@ export class SyntaxTreeContentProvider | |||
25 | range = editor.selection.isEmpty | 25 | range = editor.selection.isEmpty |
26 | ? undefined | 26 | ? undefined |
27 | : Server.client.code2ProtocolConverter.asRange( | 27 | : Server.client.code2ProtocolConverter.asRange( |
28 | editor.selection | 28 | editor.selection, |
29 | ); | 29 | ); |
30 | } | 30 | } |
31 | 31 | ||
32 | const request: SyntaxTreeParams = { | 32 | const request: SyntaxTreeParams = { |
33 | textDocument: { uri: editor.document.uri.toString() }, | 33 | textDocument: { uri: editor.document.uri.toString() }, |
34 | range | 34 | range, |
35 | }; | 35 | }; |
36 | return Server.client.sendRequest<SyntaxTreeResult>( | 36 | return Server.client.sendRequest<SyntaxTreeResult>( |
37 | 'rust-analyzer/syntaxTree', | 37 | 'rust-analyzer/syntaxTree', |
38 | request | 38 | request, |
39 | ); | 39 | ); |
40 | } | 40 | } |
41 | 41 | ||
@@ -70,7 +70,7 @@ export function createHandle(provider: SyntaxTreeContentProvider) { | |||
70 | return vscode.window.showTextDocument( | 70 | return vscode.window.showTextDocument( |
71 | document, | 71 | document, |
72 | vscode.ViewColumn.Two, | 72 | vscode.ViewColumn.Two, |
73 | true | 73 | true, |
74 | ); | 74 | ); |
75 | }; | 75 | }; |
76 | } | 76 | } |