From 8010b42b21a59e4bb1e025155b8133ae52d3cf45 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Mon, 18 Nov 2019 03:39:11 +0800 Subject: Fix npm formatting --- editors/code/src/commands/expand_macro.ts | 16 ++++++++-------- editors/code/src/extension.ts | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/editors/code/src/commands/expand_macro.ts b/editors/code/src/commands/expand_macro.ts index bf1923190..d024a70e0 100644 --- a/editors/code/src/commands/expand_macro.ts +++ b/editors/code/src/commands/expand_macro.ts @@ -2,11 +2,13 @@ import * as vscode from 'vscode'; import { Position, TextDocumentIdentifier } from 'vscode-languageclient'; import { Server } from '../server'; -type ExpandMacroResult = [string, string] +type ExpandMacroResult = [string, string]; function code_format([name, text]: [string, string]): vscode.MarkdownString { - const markdown = new vscode.MarkdownString(`#### Recursive expansion of ${name}! macro`); - markdown.appendCodeblock(text, 'rust'); + const markdown = new vscode.MarkdownString( + `#### Recursive expansion of ${name}! macro` + ); + markdown.appendCodeblock(text, 'rust'); return markdown; } @@ -14,12 +16,12 @@ export class ExpandMacroHoverProvider implements vscode.HoverProvider { public provideHover( document: vscode.TextDocument, position: vscode.Position, - token: vscode.CancellationToken, + token: vscode.CancellationToken ): Thenable | null { async function handle() { const request: MacroExpandParams = { textDocument: { uri: document.uri.toString() }, - position, + position }; const result = await Server.client.sendRequest( 'rust-analyzer/expandMacro', @@ -31,15 +33,13 @@ export class ExpandMacroHoverProvider implements vscode.HoverProvider { } return null; - }; + } return handle(); } } - interface MacroExpandParams { textDocument: TextDocumentIdentifier; position: Position; } - diff --git a/editors/code/src/extension.ts b/editors/code/src/extension.ts index 1dfa6046f..8654b6030 100644 --- a/editors/code/src/extension.ts +++ b/editors/code/src/extension.ts @@ -3,7 +3,7 @@ import * as lc from 'vscode-languageclient'; import * as commands from './commands'; import { CargoWatchProvider } from './commands/cargo_watch'; -import { ExpandMacroHoverProvider } from './commands/expand_macro' +import { ExpandMacroHoverProvider } from './commands/expand_macro'; import { HintsUpdater } from './commands/inlay_hints'; import { interactivelyStartCargoWatch, @@ -92,11 +92,11 @@ export function activate(context: vscode.ExtensionContext) { const allNotifications: Iterable< [string, lc.GenericNotificationHandler] > = [ - [ - 'rust-analyzer/publishDecorations', - notifications.publishDecorations.handle - ] - ]; + [ + 'rust-analyzer/publishDecorations', + notifications.publishDecorations.handle + ] + ]; const syntaxTreeContentProvider = new SyntaxTreeContentProvider(); // The events below are plain old javascript events, triggered and handled by vscode -- cgit v1.2.3