mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 14:03:35 +00:00
Cleanup imports
This commit is contained in:
parent
ca5c59507f
commit
260df66b77
5 changed files with 12 additions and 8 deletions
|
@ -1,4 +1,5 @@
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
|
|
||||||
import { Ctx, Cmd } from '../ctx';
|
import { Ctx, Cmd } from '../ctx';
|
||||||
// Shows status of rust-analyzer (for debugging)
|
// Shows status of rust-analyzer (for debugging)
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { Range, TextDocumentIdentifier } from 'vscode-languageclient';
|
import * as lc from 'vscode-languageclient';
|
||||||
|
|
||||||
import { Ctx, Cmd } from '../ctx';
|
import { Ctx, Cmd } from '../ctx';
|
||||||
import { applySourceChange, SourceChange } from '../source_change';
|
import { applySourceChange, SourceChange } from '../source_change';
|
||||||
|
|
||||||
|
@ -20,6 +21,6 @@ export function joinLines(ctx: Ctx): Cmd {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface JoinLinesParams {
|
interface JoinLinesParams {
|
||||||
textDocument: TextDocumentIdentifier;
|
textDocument: lc.TextDocumentIdentifier;
|
||||||
range: Range;
|
range: lc.Range;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import { Position, TextDocumentIdentifier } from 'vscode-languageclient';
|
import * as lc from 'vscode-languageclient';
|
||||||
|
|
||||||
import { Ctx, Cmd } from '../ctx';
|
import { Ctx, Cmd } from '../ctx';
|
||||||
|
|
||||||
export function matchingBrace(ctx: Ctx): Cmd {
|
export function matchingBrace(ctx: Ctx): Cmd {
|
||||||
|
@ -14,7 +15,7 @@ export function matchingBrace(ctx: Ctx): Cmd {
|
||||||
ctx.client.code2ProtocolConverter.asPosition(s.active),
|
ctx.client.code2ProtocolConverter.asPosition(s.active),
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
const response = await ctx.client.sendRequest<Position[]>(
|
const response = await ctx.client.sendRequest<lc.Position[]>(
|
||||||
'rust-analyzer/findMatchingBrace',
|
'rust-analyzer/findMatchingBrace',
|
||||||
request,
|
request,
|
||||||
);
|
);
|
||||||
|
@ -30,6 +31,6 @@ export function matchingBrace(ctx: Ctx): Cmd {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface FindMatchingBraceParams {
|
interface FindMatchingBraceParams {
|
||||||
textDocument: TextDocumentIdentifier;
|
textDocument: lc.TextDocumentIdentifier;
|
||||||
offsets: Position[];
|
offsets: lc.Position[];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import * as lc from 'vscode-languageclient';
|
import * as lc from 'vscode-languageclient';
|
||||||
|
|
||||||
import { applySourceChange, SourceChange } from '../source_change';
|
import { applySourceChange, SourceChange } from '../source_change';
|
||||||
import { Cmd, Ctx } from '../ctx';
|
import { Cmd, Ctx } from '../ctx';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
|
|
||||||
import * as lc from 'vscode-languageclient';
|
import * as lc from 'vscode-languageclient';
|
||||||
|
|
||||||
import { Ctx, Cmd } from '../ctx';
|
import { Ctx, Cmd } from '../ctx';
|
||||||
|
|
||||||
export function parentModule(ctx: Ctx): Cmd {
|
export function parentModule(ctx: Ctx): Cmd {
|
||||||
|
|
Loading…
Reference in a new issue