Cleanup imports

This commit is contained in:
Aleksey Kladov 2019-12-30 19:07:28 +01:00
parent ca5c59507f
commit 260df66b77
5 changed files with 12 additions and 8 deletions

View file

@ -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)

View file

@ -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;
} }

View file

@ -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[];
} }

View file

@ -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';

View file

@ -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 {