From 9a207be986ad08ffb01e52511e65671bb7dc7313 Mon Sep 17 00:00:00 2001 From: kouhe3 <25522053+kouhe3@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:50:29 +0800 Subject: [PATCH] prettier format --- editors/code/src/debug.ts | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/editors/code/src/debug.ts b/editors/code/src/debug.ts index 0114edf689..77ab44f24c 100644 --- a/editors/code/src/debug.ts +++ b/editors/code/src/debug.ts @@ -6,7 +6,7 @@ import type * as ra from "./lsp_ext"; import { Cargo } from "./toolchain"; import type { Ctx } from "./ctx"; import { createTaskFromRunnable, prepareEnv } from "./run"; -import { execSync } from 'node:child_process'; +import { execSync } from "node:child_process"; import { execute, isCargoRunnableArgs, unwrapUndefinable } from "./util"; import type { Config } from "./config"; @@ -110,9 +110,9 @@ async function getDebugConfiguration( await vscode.window.showErrorMessage( `Install [CodeLLDB](command:${commandCodeLLDB} "Open CodeLLDB")` + - `, [lldb-dap](command:${commandLLDBDap} "Open lldb-dap")` + - `, [C/C++](command:${commandCCpp} "Open C/C++") ` + - `or [Native Debug](command:${commandNativeDebug} "Open Native Debug") for debugging.`, + `, [lldb-dap](command:${commandLLDBDap} "Open lldb-dap")` + + `, [C/C++](command:${commandCCpp} "Open C/C++") ` + + `or [Native Debug](command:${commandNativeDebug} "Open Native Debug") for debugging.`, ); return; } @@ -130,7 +130,7 @@ async function getDebugConfiguration( !isMultiFolderWorkspace || !runnableArgs.workspaceRoot ? firstWorkspace : workspaceFolders.find((w) => runnableArgs.workspaceRoot?.includes(w.uri.fsPath)) || - firstWorkspace; + firstWorkspace; const workspace = unwrapUndefinable(maybeWorkspace); let wsFolder = path.normalize(workspace.uri.fsPath); @@ -237,15 +237,15 @@ const knownEngines: { runnableArgs.executableArgs, ], additional: { - "sourceMap": [ + sourceMap: [ [ - `/rustc/${/commit-hash:\s(.*)$/m.exec(execSync("rustc -V -v", {}).toString())?.[1] - }/library`, - "${config:rust-analyzer.cargo.sysroot}/lib/rustlib/src/rust/library" - - ] - ] - } + `/rustc/${/commit-hash:\s(.*)$/m.exec( + execSync("rustc -V -v", {}).toString(), + )?.[1]}/library`, + "${config:rust-analyzer.cargo.sysroot}/lib/rustlib/src/rust/library", + ], + ], + }, }, "vadimcn.vscode-lldb": { type: "lldb", @@ -366,7 +366,6 @@ type LldbDapDebugConfig = { sourceMap: [string, string][]; } & BaseDebugConfig<"lldb-dap">; - type CodeLldbDebugConfig = { program: string; args: string[];