From e26071d96e1ff56289213dbe78415f836de8a70e Mon Sep 17 00:00:00 2001 From: Daniel McNab <36049421+DJMcNab@users.noreply.github.com> Date: Mon, 8 Oct 2018 22:38:33 +0100 Subject: Run prettier on all files --- editors/code/src/events/change_active_text_editor.ts | 15 ++++++++++++--- editors/code/src/events/change_text_document.ts | 13 ++++++++++--- editors/code/src/events/index.ts | 5 +---- 3 files changed, 23 insertions(+), 10 deletions(-) (limited to 'editors/code/src/events') diff --git a/editors/code/src/events/change_active_text_editor.ts b/editors/code/src/events/change_active_text_editor.ts index 3440aa0c3..0b7ceb65d 100644 --- a/editors/code/src/events/change_active_text_editor.ts +++ b/editors/code/src/events/change_active_text_editor.ts @@ -5,10 +5,19 @@ import { Decoration } from '../highlighting'; import { Server } from '../server'; export async function handle(editor: TextEditor | undefined) { - if (!Server.config.highlightingOn || !editor || editor.document.languageId !== 'rust') { return; } + if ( + !Server.config.highlightingOn || + !editor || + editor.document.languageId !== 'rust' + ) { + return; + } const params: TextDocumentIdentifier = { - uri: editor.document.uri.toString(), + uri: editor.document.uri.toString() }; - const decorations = await Server.client.sendRequest('m/decorationsRequest', params); + const decorations = await Server.client.sendRequest( + 'm/decorationsRequest', + params + ); Server.highlighter.setHighlights(editor, decorations); } diff --git a/editors/code/src/events/change_text_document.ts b/editors/code/src/events/change_text_document.ts index b3000e026..6be057245 100644 --- a/editors/code/src/events/change_text_document.ts +++ b/editors/code/src/events/change_text_document.ts @@ -1,11 +1,18 @@ import * as vscode from 'vscode'; -import { syntaxTreeUri, TextDocumentContentProvider } from '../commands/syntaxTree'; +import { + syntaxTreeUri, + TextDocumentContentProvider +} from '../commands/syntaxTree'; -export function createHandler(textDocumentContentProvider: TextDocumentContentProvider) { +export function createHandler( + textDocumentContentProvider: TextDocumentContentProvider +) { return (event: vscode.TextDocumentChangeEvent) => { const doc = event.document; - if (doc.languageId !== 'rust') { return; } + if (doc.languageId !== 'rust') { + return; + } afterLs(() => { textDocumentContentProvider.eventEmitter.fire(syntaxTreeUri); }); diff --git a/editors/code/src/events/index.ts b/editors/code/src/events/index.ts index b570a7a92..4c154563f 100644 --- a/editors/code/src/events/index.ts +++ b/editors/code/src/events/index.ts @@ -1,7 +1,4 @@ import * as changeActiveTextEditor from './change_active_text_editor'; import * as changeTextDocument from './change_text_document'; -export { - changeActiveTextEditor, - changeTextDocument, -}; +export { changeActiveTextEditor, changeTextDocument }; -- cgit v1.2.3