From 73799640481c269a5aad408c99a22592d914fb1b Mon Sep 17 00:00:00 2001 From: Veetaha Date: Mon, 17 Feb 2020 22:09:44 +0200 Subject: vscode: press ; to respect semicolons --- editors/code/src/commands/index.ts | 2 +- editors/code/src/commands/ssr.ts | 4 ++-- editors/code/src/highlighting.ts | 2 +- editors/code/src/inlay_hints.ts | 8 ++++---- editors/code/src/installation/download_artifact.ts | 4 ++-- editors/code/src/main.ts | 12 ++++++------ editors/code/src/status_display.ts | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) (limited to 'editors/code') diff --git a/editors/code/src/commands/index.ts b/editors/code/src/commands/index.ts index d05f40d67..bebd99ca9 100644 --- a/editors/code/src/commands/index.ts +++ b/editors/code/src/commands/index.ts @@ -16,7 +16,7 @@ export * from './ssr'; export function collectGarbage(ctx: Ctx): Cmd { return async () => { - ctx.client?.sendRequest('rust-analyzer/collectGarbage', null); + await ctx.client?.sendRequest('rust-analyzer/collectGarbage', null); }; } diff --git a/editors/code/src/commands/ssr.ts b/editors/code/src/commands/ssr.ts index 6287bf47b..9b814612a 100644 --- a/editors/code/src/commands/ssr.ts +++ b/editors/code/src/commands/ssr.ts @@ -14,9 +14,9 @@ export function ssr(ctx: Ctx): Cmd { if (x.includes('==>>')) { return null; } - return "Enter request: pattern ==>> template" + return "Enter request: pattern ==>> template"; } - } + }; const request = await vscode.window.showInputBox(options); if (!request) return; diff --git a/editors/code/src/highlighting.ts b/editors/code/src/highlighting.ts index a2db04de8..c4d286aef 100644 --- a/editors/code/src/highlighting.ts +++ b/editors/code/src/highlighting.ts @@ -29,7 +29,7 @@ export function activateHighlighting(ctx: Ctx) { highlighter.setHighlights(targetEditor, params.decorations); }, ); - }; + } vscode.workspace.onDidChangeConfiguration( _ => highlighter.removeHighlights(), diff --git a/editors/code/src/inlay_hints.ts b/editors/code/src/inlay_hints.ts index f82df66ae..26705067a 100644 --- a/editors/code/src/inlay_hints.ts +++ b/editors/code/src/inlay_hints.ts @@ -29,13 +29,13 @@ export function activateInlayHints(ctx: Ctx) { ctx.pushCleanup({ dispose() { - hintsUpdater.clear() + hintsUpdater.clear(); } - }) + }); // XXX: we don't await this, thus Promise rejections won't be handled, but // this should never throw in fact... - hintsUpdater.setEnabled(ctx.config.displayInlayHints) + void hintsUpdater.setEnabled(ctx.config.displayInlayHints); } interface InlayHintsParams { @@ -57,7 +57,7 @@ const typeHintDecorationType = vscode.window.createTextEditorDecorationType({ const parameterHintDecorationType = vscode.window.createTextEditorDecorationType({ before: { color: new vscode.ThemeColor('rust_analyzer.inlayHint'), - } + }, }); class HintsUpdater { diff --git a/editors/code/src/installation/download_artifact.ts b/editors/code/src/installation/download_artifact.ts index de655f8f4..9996c556f 100644 --- a/editors/code/src/installation/download_artifact.ts +++ b/editors/code/src/installation/download_artifact.ts @@ -15,7 +15,7 @@ import { throttle } from "throttle-debounce"; * of the artifact as `displayName`. */ export async function downloadArtifact( - {downloadUrl, releaseName}: ArtifactReleaseInfo, + { downloadUrl, releaseName }: ArtifactReleaseInfo, artifactFileName: string, installationDir: string, displayName: string, @@ -23,7 +23,7 @@ export async function downloadArtifact( await fs.mkdir(installationDir).catch(err => assert.strictEqual( err?.code, "EEXIST", - `Couldn't create directory "${installationDir}" to download `+ + `Couldn't create directory "${installationDir}" to download ` + `${artifactFileName} artifact: ${err.message}` )); diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index 0ad7ef1bb..a22e0bc66 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -11,7 +11,7 @@ import { Config } from './config'; let ctx: Ctx | undefined; export async function activate(context: vscode.ExtensionContext) { - const config = new Config(context) + const config = new Config(context); const serverPath = await ensureServerBinary(config.serverSource); if (serverPath == null) { @@ -33,7 +33,7 @@ export async function activate(context: vscode.ExtensionContext) { vscode.window.showInformationMessage('Reloading rust-analyzer...'); // @DanTup maneuver // https://github.com/microsoft/vscode/issues/45774#issuecomment-373423895 - await deactivate() + await deactivate(); for (const sub of ctx.subscriptions) { try { sub.dispose(); @@ -41,9 +41,9 @@ export async function activate(context: vscode.ExtensionContext) { console.error(e); } } - await activate(context) - } - }) + await activate(context); + }; + }); ctx.registerCommand('analyzerStatus', commands.analyzerStatus); ctx.registerCommand('collectGarbage', commands.collectGarbage); @@ -54,7 +54,7 @@ export async function activate(context: vscode.ExtensionContext) { ctx.registerCommand('expandMacro', commands.expandMacro); ctx.registerCommand('run', commands.run); ctx.registerCommand('onEnter', commands.onEnter); - ctx.registerCommand('ssr', commands.ssr) + ctx.registerCommand('ssr', commands.ssr); // Internal commands which are invoked by the server. ctx.registerCommand('runSingle', commands.runSingle); diff --git a/editors/code/src/status_display.ts b/editors/code/src/status_display.ts index ed0d82166..0f5f6ef99 100644 --- a/editors/code/src/status_display.ts +++ b/editors/code/src/status_display.ts @@ -15,7 +15,7 @@ export function activateStatusDisplay(ctx: Ctx) { WorkDoneProgress.type, 'rustAnalyzer/cargoWatcher', params => statusDisplay.handleProgressNotification(params) - )) + )); } } -- cgit v1.2.3