diff options
Diffstat (limited to 'editors/code/src/commands/parent_module.ts')
-rw-r--r-- | editors/code/src/commands/parent_module.ts | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/editors/code/src/commands/parent_module.ts b/editors/code/src/commands/parent_module.ts index 4bb92eb96..806c3d34c 100644 --- a/editors/code/src/commands/parent_module.ts +++ b/editors/code/src/commands/parent_module.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import * as vscode from 'vscode'; | 1 | import * as vscode from 'vscode'; |
2 | 2 | ||
3 | import { Location, TextDocumentIdentifier } from 'vscode-languageclient'; | 3 | import * as lc from 'vscode-languageclient'; |
4 | import { Server } from '../server'; | 4 | import { Server } from '../server'; |
5 | 5 | ||
6 | export async function handle() { | 6 | export async function handle() { |
@@ -8,10 +8,13 @@ export async function handle() { | |||
8 | if (editor == null || editor.document.languageId !== 'rust') { | 8 | if (editor == null || editor.document.languageId !== 'rust') { |
9 | return; | 9 | return; |
10 | } | 10 | } |
11 | const request: TextDocumentIdentifier = { | 11 | const request: lc.TextDocumentPositionParams = { |
12 | uri: editor.document.uri.toString() | 12 | textDocument: { uri: editor.document.uri.toString() }, |
13 | position: Server.client.code2ProtocolConverter.asPosition( | ||
14 | editor.selection.active | ||
15 | ) | ||
13 | }; | 16 | }; |
14 | const response = await Server.client.sendRequest<Location[]>( | 17 | const response = await Server.client.sendRequest<lc.Location[]>( |
15 | 'm/parentModule', | 18 | 'm/parentModule', |
16 | request | 19 | request |
17 | ); | 20 | ); |