From cfa3a3df5174d77686524da0307750c84b451515 Mon Sep 17 00:00:00 2001 From: tiger-eagle Date: Mon, 25 May 2020 22:40:32 +0800 Subject: [PATCH] feat(cmds): parentModule extension https://github.com/fannheyward/coc-rust-analyzer/issues/256 --- src/commands.ts | 4 ++-- src/lsp_ext.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands.ts b/src/commands.ts index ae85a6f..13e96b8 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -89,8 +89,8 @@ export function parentModule(ctx: Ctx): Cmd { const response = await ctx.client.sendRequest(ra.parentModule, param); if (response.length > 0) { - const uri = response[0].uri; - const range = response[0].range; + const uri = response[0].targetUri; + const range = response[0].targetRange; workspace.jumpTo(uri, range.start); } diff --git a/src/lsp_ext.ts b/src/lsp_ext.ts index c62c5d1..5d585d3 100644 --- a/src/lsp_ext.ts +++ b/src/lsp_ext.ts @@ -30,7 +30,7 @@ export interface MatchingBraceParams { } export const matchingBrace = new lc.RequestType('experimental/matchingBrace'); -export const parentModule = new lc.RequestType('rust-analyzer/parentModule'); +export const parentModule = new lc.RequestType('experimental/parentModule'); export interface JoinLinesParams { textDocument: lc.TextDocumentIdentifier;