diff --git a/editors/code/src/commands/index.ts b/editors/code/src/commands/index.ts index d05f40d67a..bebd99ca93 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 6287bf47b4..9b814612aa 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 a2db04de87..c4d286aefe 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 f82df66aed..26705067ae 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 de655f8f4b..9996c556fc 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 0ad7ef1bbd..a22e0bc666 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 ed0d821665..0f5f6ef99e 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) - )) + )); } }