From 260df66b7742e76c76184388253552c5055b1945 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 30 Dec 2019 19:07:28 +0100 Subject: Cleanup imports --- editors/code/src/commands/analyzer_status.ts | 1 + editors/code/src/commands/join_lines.ts | 7 ++++--- editors/code/src/commands/matching_brace.ts | 9 +++++---- editors/code/src/commands/on_enter.ts | 1 + editors/code/src/commands/parent_module.ts | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/editors/code/src/commands/analyzer_status.ts b/editors/code/src/commands/analyzer_status.ts index 830e40e8f..b2b624b75 100644 --- a/editors/code/src/commands/analyzer_status.ts +++ b/editors/code/src/commands/analyzer_status.ts @@ -1,4 +1,5 @@ import * as vscode from 'vscode'; + import { Ctx, Cmd } from '../ctx'; // Shows status of rust-analyzer (for debugging) diff --git a/editors/code/src/commands/join_lines.ts b/editors/code/src/commands/join_lines.ts index e906759c1..f4f902cf9 100644 --- a/editors/code/src/commands/join_lines.ts +++ b/editors/code/src/commands/join_lines.ts @@ -1,4 +1,5 @@ -import { Range, TextDocumentIdentifier } from 'vscode-languageclient'; +import * as lc from 'vscode-languageclient'; + import { Ctx, Cmd } from '../ctx'; import { applySourceChange, SourceChange } from '../source_change'; @@ -20,6 +21,6 @@ export function joinLines(ctx: Ctx): Cmd { } interface JoinLinesParams { - textDocument: TextDocumentIdentifier; - range: Range; + textDocument: lc.TextDocumentIdentifier; + range: lc.Range; } diff --git a/editors/code/src/commands/matching_brace.ts b/editors/code/src/commands/matching_brace.ts index a3febc5f4..59c253f88 100644 --- a/editors/code/src/commands/matching_brace.ts +++ b/editors/code/src/commands/matching_brace.ts @@ -1,5 +1,6 @@ import * as vscode from 'vscode'; -import { Position, TextDocumentIdentifier } from 'vscode-languageclient'; +import * as lc from 'vscode-languageclient'; + import { Ctx, Cmd } from '../ctx'; export function matchingBrace(ctx: Ctx): Cmd { @@ -14,7 +15,7 @@ export function matchingBrace(ctx: Ctx): Cmd { ctx.client.code2ProtocolConverter.asPosition(s.active), ), }; - const response = await ctx.client.sendRequest( + const response = await ctx.client.sendRequest( 'rust-analyzer/findMatchingBrace', request, ); @@ -30,6 +31,6 @@ export function matchingBrace(ctx: Ctx): Cmd { } interface FindMatchingBraceParams { - textDocument: TextDocumentIdentifier; - offsets: Position[]; + textDocument: lc.TextDocumentIdentifier; + offsets: lc.Position[]; } diff --git a/editors/code/src/commands/on_enter.ts b/editors/code/src/commands/on_enter.ts index efc0dfe1d..8324060e8 100644 --- a/editors/code/src/commands/on_enter.ts +++ b/editors/code/src/commands/on_enter.ts @@ -1,4 +1,5 @@ import * as lc from 'vscode-languageclient'; + import { applySourceChange, SourceChange } from '../source_change'; import { Cmd, Ctx } from '../ctx'; diff --git a/editors/code/src/commands/parent_module.ts b/editors/code/src/commands/parent_module.ts index d641181fa..258b61b21 100644 --- a/editors/code/src/commands/parent_module.ts +++ b/editors/code/src/commands/parent_module.ts @@ -1,6 +1,6 @@ import * as vscode from 'vscode'; - import * as lc from 'vscode-languageclient'; + import { Ctx, Cmd } from '../ctx'; export function parentModule(ctx: Ctx): Cmd { -- cgit v1.2.3