mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-22 11:24:24 +00:00
Document parentModule
experimental LSP request
This commit is contained in:
parent
a30bdd9795
commit
0ebb25b29b
7 changed files with 64 additions and 38 deletions
|
@ -138,10 +138,10 @@ export function parentModule(ctx: Ctx): Cmd {
|
|||
),
|
||||
});
|
||||
const loc = response[0];
|
||||
if (loc == null) return;
|
||||
if (!loc) return;
|
||||
|
||||
const uri = client.protocol2CodeConverter.asUri(loc.uri);
|
||||
const range = client.protocol2CodeConverter.asRange(loc.range);
|
||||
const uri = client.protocol2CodeConverter.asUri(loc.targetUri);
|
||||
const range = client.protocol2CodeConverter.asRange(loc.targetRange);
|
||||
|
||||
const doc = await vscode.workspace.openTextDocument(uri);
|
||||
const e = await vscode.window.showTextDocument(doc);
|
||||
|
|
|
@ -31,7 +31,7 @@ export interface MatchingBraceParams {
|
|||
}
|
||||
export const matchingBrace = new lc.RequestType<MatchingBraceParams, lc.Position[], void>("experimental/matchingBrace");
|
||||
|
||||
export const parentModule = new lc.RequestType<lc.TextDocumentPositionParams, lc.Location[], void>("rust-analyzer/parentModule");
|
||||
export const parentModule = new lc.RequestType<lc.TextDocumentPositionParams, lc.LocationLink[], void>("experimental/parentModule");
|
||||
|
||||
export interface JoinLinesParams {
|
||||
textDocument: lc.TextDocumentIdentifier;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue