From f2d719b24afd404dbaf26332ff314a6161c74b71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20Ochagav=C3=ADa?= Date: Tue, 9 Oct 2018 22:56:15 +0200 Subject: Format vscode extension and add npm run fix --- editors/code/src/commands/on_enter.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'editors/code/src/commands/on_enter.ts') diff --git a/editors/code/src/commands/on_enter.ts b/editors/code/src/commands/on_enter.ts index 2666797fe..fe6aca63d 100644 --- a/editors/code/src/commands/on_enter.ts +++ b/editors/code/src/commands/on_enter.ts @@ -1,7 +1,10 @@ import * as vscode from 'vscode'; import * as lc from 'vscode-languageclient'; import { Server } from '../server'; -import { handle as applySourceChange, SourceChange } from './apply_source_change'; +import { + handle as applySourceChange, + SourceChange +} from './apply_source_change'; interface OnEnterParams { textDocument: lc.TextDocumentIdentifier; @@ -10,12 +13,18 @@ interface OnEnterParams { export async function handle(event: { text: string }): Promise { const editor = vscode.window.activeTextEditor; - if (editor == null || editor.document.languageId !== 'rust' || event.text !== '\n') { + if ( + editor == null || + editor.document.languageId !== 'rust' || + event.text !== '\n' + ) { return false; } const request: OnEnterParams = { textDocument: { uri: editor.document.uri.toString() }, - position: Server.client.code2ProtocolConverter.asPosition(editor.selection.active), + position: Server.client.code2ProtocolConverter.asPosition( + editor.selection.active + ) }; const change = await Server.client.sendRequest( 'm/onEnter', @@ -25,5 +34,5 @@ export async function handle(event: { text: string }): Promise { return false; } await applySourceChange(change); - return true + return true; } -- cgit v1.2.3