diff options
author | Adolfo OchagavĂa <[email protected]> | 2018-10-07 21:59:02 +0100 |
---|---|---|
committer | Adolfo OchagavĂa <[email protected]> | 2018-10-07 22:12:40 +0100 |
commit | 4d62cfccbb8281f33b6f894df07e7316a9d45bfb (patch) | |
tree | 56ad69cb2f5c1096a2a74cfa078b92c40fe902e1 /editors/code/src/commands/join_lines.ts | |
parent | 69de7e2fd71c3a808f0ac856d7b105eeb210f169 (diff) |
Apply tslint suggestions, round one
Diffstat (limited to 'editors/code/src/commands/join_lines.ts')
-rw-r--r-- | editors/code/src/commands/join_lines.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/editors/code/src/commands/join_lines.ts b/editors/code/src/commands/join_lines.ts index 7ae7b9d76..80ad4460b 100644 --- a/editors/code/src/commands/join_lines.ts +++ b/editors/code/src/commands/join_lines.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import * as vscode from 'vscode'; | 1 | import * as vscode from 'vscode'; |
2 | 2 | ||
3 | import { TextDocumentIdentifier, Range } from "vscode-languageclient"; | 3 | import { Range, TextDocumentIdentifier } from 'vscode-languageclient'; |
4 | import { Server } from '../server'; | 4 | import { Server } from '../server'; |
5 | import { handle as applySourceChange, SourceChange } from './apply_source_change'; | 5 | import { handle as applySourceChange, SourceChange } from './apply_source_change'; |
6 | 6 | ||
@@ -10,12 +10,12 @@ interface JoinLinesParams { | |||
10 | } | 10 | } |
11 | 11 | ||
12 | export async function handle() { | 12 | export async function handle() { |
13 | let editor = vscode.window.activeTextEditor | 13 | const editor = vscode.window.activeTextEditor; |
14 | if (editor == null || editor.document.languageId != "rust") return | 14 | if (editor == null || editor.document.languageId != 'rust') { return; } |
15 | let request: JoinLinesParams = { | 15 | const request: JoinLinesParams = { |
16 | textDocument: { uri: editor.document.uri.toString() }, | ||
17 | range: Server.client.code2ProtocolConverter.asRange(editor.selection), | 16 | range: Server.client.code2ProtocolConverter.asRange(editor.selection), |
18 | } | 17 | textDocument: { uri: editor.document.uri.toString() }, |
19 | let change = await Server.client.sendRequest<SourceChange>("m/joinLines", request) | 18 | }; |
20 | await applySourceChange(change) | 19 | const change = await Server.client.sendRequest<SourceChange>('m/joinLines', request); |
20 | await applySourceChange(change); | ||
21 | } | 21 | } |