Fully add inline modules to module tree
This commit is contained in:
@@ -6,10 +6,6 @@ import {
|
||||
SourceChange
|
||||
} from './apply_source_change';
|
||||
|
||||
interface OnEnterParams {
|
||||
textDocument: lc.TextDocumentIdentifier;
|
||||
position: lc.Position;
|
||||
}
|
||||
|
||||
export async function handle(event: { text: string }): Promise<boolean> {
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
@@ -20,7 +16,7 @@ export async function handle(event: { text: string }): Promise<boolean> {
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
const request: OnEnterParams = {
|
||||
const request: lc.TextDocumentPositionParams = {
|
||||
textDocument: { uri: editor.document.uri.toString() },
|
||||
position: Server.client.code2ProtocolConverter.asPosition(
|
||||
editor.selection.active
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user