diff options
author | Seivan Heidari <[email protected]> | 2019-12-23 14:35:31 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-12-23 14:35:31 +0000 |
commit | b21d9337d9200e2cfdc90b386591c72c302dc03e (patch) | |
tree | f81f5c08f821115cee26fa4d3ceaae88c7807fd5 /editors/code/src/commands/expand_macro.ts | |
parent | 18a0937585b836ec5ed054b9ae48e0156ab6d9ef (diff) | |
parent | ce07a2daa9e53aa86a769f8641b14c2878444fbc (diff) |
Merge branch 'master' into feature/themes
Diffstat (limited to 'editors/code/src/commands/expand_macro.ts')
-rw-r--r-- | editors/code/src/commands/expand_macro.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editors/code/src/commands/expand_macro.ts b/editors/code/src/commands/expand_macro.ts index 34e0c8fb3..17c78280a 100644 --- a/editors/code/src/commands/expand_macro.ts +++ b/editors/code/src/commands/expand_macro.ts | |||
@@ -3,7 +3,7 @@ import { Position, TextDocumentIdentifier } from 'vscode-languageclient'; | |||
3 | import { Server } from '../server'; | 3 | import { Server } from '../server'; |
4 | 4 | ||
5 | export const expandMacroUri = vscode.Uri.parse( | 5 | export const expandMacroUri = vscode.Uri.parse( |
6 | 'rust-analyzer://expandMacro/[EXPANSION].rs' | 6 | 'rust-analyzer://expandMacro/[EXPANSION].rs', |
7 | ); | 7 | ); |
8 | 8 | ||
9 | export class ExpandMacroContentProvider | 9 | export class ExpandMacroContentProvider |
@@ -11,7 +11,7 @@ export class ExpandMacroContentProvider | |||
11 | public eventEmitter = new vscode.EventEmitter<vscode.Uri>(); | 11 | public eventEmitter = new vscode.EventEmitter<vscode.Uri>(); |
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 | async function handle() { | 16 | async function handle() { |
17 | const editor = vscode.window.activeTextEditor; | 17 | const editor = vscode.window.activeTextEditor; |
@@ -22,11 +22,11 @@ export class ExpandMacroContentProvider | |||
22 | const position = editor.selection.active; | 22 | const position = editor.selection.active; |
23 | const request: MacroExpandParams = { | 23 | const request: MacroExpandParams = { |
24 | textDocument: { uri: editor.document.uri.toString() }, | 24 | textDocument: { uri: editor.document.uri.toString() }, |
25 | position | 25 | position, |
26 | }; | 26 | }; |
27 | const expanded = await Server.client.sendRequest<ExpandedMacro>( | 27 | const expanded = await Server.client.sendRequest<ExpandedMacro>( |
28 | 'rust-analyzer/expandMacro', | 28 | 'rust-analyzer/expandMacro', |
29 | request | 29 | request, |
30 | ); | 30 | ); |
31 | 31 | ||
32 | if (expanded == null) { | 32 | if (expanded == null) { |
@@ -58,7 +58,7 @@ export function createHandle(provider: ExpandMacroContentProvider) { | |||
58 | return vscode.window.showTextDocument( | 58 | return vscode.window.showTextDocument( |
59 | document, | 59 | document, |
60 | vscode.ViewColumn.Two, | 60 | vscode.ViewColumn.Two, |
61 | true | 61 | true, |
62 | ); | 62 | ); |
63 | }; | 63 | }; |
64 | } | 64 | } |