mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Fully add inline modules to module tree
This commit is contained in:
parent
44d8919384
commit
6bbcfca7ae
9 changed files with 99 additions and 47 deletions
|
@ -1,6 +1,6 @@
|
|||
import * as vscode from 'vscode';
|
||||
|
||||
import { Location, TextDocumentIdentifier } from 'vscode-languageclient';
|
||||
import * as lc from 'vscode-languageclient';
|
||||
import { Server } from '../server';
|
||||
|
||||
export async function handle() {
|
||||
|
@ -8,10 +8,13 @@ export async function handle() {
|
|||
if (editor == null || editor.document.languageId !== 'rust') {
|
||||
return;
|
||||
}
|
||||
const request: TextDocumentIdentifier = {
|
||||
uri: editor.document.uri.toString()
|
||||
const request: lc.TextDocumentPositionParams = {
|
||||
textDocument: { uri: editor.document.uri.toString() },
|
||||
position: Server.client.code2ProtocolConverter.asPosition(
|
||||
editor.selection.active
|
||||
)
|
||||
};
|
||||
const response = await Server.client.sendRequest<Location[]>(
|
||||
const response = await Server.client.sendRequest<lc.Location[]>(
|
||||
'm/parentModule',
|
||||
request
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue