diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-09 07:16:36 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-09 07:16:36 +0100 |
commit | c9798c0e6da53c132021f03ac7a50ccd8714b371 (patch) | |
tree | 0d6d49b2eb40ad161a72adbfbf9874b64540bf74 /editors/code/src/commands/parent_module.ts | |
parent | f4ad36e972989c3feed8671d6d6fca0aed37cd8f (diff) | |
parent | e26071d96e1ff56289213dbe78415f836de8a70e (diff) |
Merge #104
104: Add vscode extension to CI r=aochagavia a=DJMcNab
Note that this testing is only done on travis - we are only running formatting and linting, so feature parity on appveyor is not required.
CC @aochagavia.
Fixes? #100
Co-authored-by: Daniel McNab <[email protected]>
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 | ||