diff options
author | Daniel McNab <[email protected]> | 2018-10-08 22:38:33 +0100 |
---|---|---|
committer | Daniel McNab <[email protected]> | 2018-10-08 22:38:33 +0100 |
commit | e26071d96e1ff56289213dbe78415f836de8a70e (patch) | |
tree | 0d6d49b2eb40ad161a72adbfbf9874b64540bf74 /editors/code/src/commands/parent_module.ts | |
parent | 3a405b65d61a5ad3176c223e4b7226a43fcd186e (diff) |
Run prettier on all files
Diffstat (limited to 'editors/code/src/commands/parent_module.ts')
-rw-r--r-- | editors/code/src/commands/parent_module.ts | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/editors/code/src/commands/parent_module.ts b/editors/code/src/commands/parent_module.ts index d66fb3026..4bb92eb96 100644 --- a/editors/code/src/commands/parent_module.ts +++ b/editors/code/src/commands/parent_module.ts | |||
@@ -5,13 +5,20 @@ import { Server } from '../server'; | |||
5 | 5 | ||
6 | export async function handle() { | 6 | export async function handle() { |
7 | const editor = vscode.window.activeTextEditor; | 7 | const editor = vscode.window.activeTextEditor; |
8 | if (editor == null || editor.document.languageId !== 'rust') { return; } | 8 | if (editor == null || editor.document.languageId !== 'rust') { |
9 | return; | ||
10 | } | ||
9 | const request: TextDocumentIdentifier = { | 11 | const request: TextDocumentIdentifier = { |
10 | uri: editor.document.uri.toString(), | 12 | uri: editor.document.uri.toString() |
11 | }; | 13 | }; |
12 | const response = await Server.client.sendRequest<Location[]>('m/parentModule', request); | 14 | const response = await Server.client.sendRequest<Location[]>( |
15 | 'm/parentModule', | ||
16 | request | ||
17 | ); | ||
13 | const loc = response[0]; | 18 | const loc = response[0]; |
14 | if (loc == null) { return; } | 19 | if (loc == null) { |
20 | return; | ||
21 | } | ||
15 | const uri = Server.client.protocol2CodeConverter.asUri(loc.uri); | 22 | const uri = Server.client.protocol2CodeConverter.asUri(loc.uri); |
16 | const range = Server.client.protocol2CodeConverter.asRange(loc.range); | 23 | const range = Server.client.protocol2CodeConverter.asRange(loc.range); |
17 | 24 | ||