aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands/expand_macro.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/commands/expand_macro.ts')
-rw-r--r--editors/code/src/commands/expand_macro.ts10
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';
3import { Server } from '../server'; 3import { Server } from '../server';
4 4
5export const expandMacroUri = vscode.Uri.parse( 5export const expandMacroUri = vscode.Uri.parse(
6 'rust-analyzer://expandMacro/[EXPANSION].rs' 6 'rust-analyzer://expandMacro/[EXPANSION].rs',
7); 7);
8 8
9export class ExpandMacroContentProvider 9export 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}