Apply tslint suggestions, round one

This commit is contained in:
Adolfo Ochagavía 2018-10-07 22:59:02 +02:00
parent 69de7e2fd7
commit 4d62cfccbb
16 changed files with 257 additions and 241 deletions

View file

@ -1,6 +1,6 @@
import * as vscode from 'vscode';
import { TextDocumentIdentifier, Range } from "vscode-languageclient";
import { Range, TextDocumentIdentifier } from 'vscode-languageclient';
import { Server } from '../server';
import { handle as applySourceChange, SourceChange } from './apply_source_change';
@ -10,12 +10,12 @@ interface JoinLinesParams {
}
export async function handle() {
let editor = vscode.window.activeTextEditor
if (editor == null || editor.document.languageId != "rust") return
let request: JoinLinesParams = {
textDocument: { uri: editor.document.uri.toString() },
const editor = vscode.window.activeTextEditor;
if (editor == null || editor.document.languageId != 'rust') { return; }
const request: JoinLinesParams = {
range: Server.client.code2ProtocolConverter.asRange(editor.selection),
}
let change = await Server.client.sendRequest<SourceChange>("m/joinLines", request)
await applySourceChange(change)
textDocument: { uri: editor.document.uri.toString() },
};
const change = await Server.client.sendRequest<SourceChange>('m/joinLines', request);
await applySourceChange(change);
}