mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Tidy up vscode extension a bit
This commit is contained in:
parent
f9bb5476c3
commit
ff07caa9de
16 changed files with 143 additions and 171 deletions
|
@ -6,8 +6,7 @@ import type * as ra from "./lsp_ext";
|
|||
import { Cargo, getRustcId, getSysroot } from "./toolchain";
|
||||
import type { Ctx } from "./ctx";
|
||||
import { prepareEnv } from "./run";
|
||||
import { unwrapUndefinable } from "./undefinable";
|
||||
import { isCargoRunnableArgs } from "./util";
|
||||
import { isCargoRunnableArgs, unwrapUndefinable } from "./util";
|
||||
|
||||
const debugOutput = vscode.window.createOutputChannel("Debug");
|
||||
type DebugConfigProvider = (
|
||||
|
@ -136,7 +135,7 @@ async function getDebugConfiguration(
|
|||
const workspaceQualifier = isMultiFolderWorkspace ? `:${workspace.name}` : "";
|
||||
function simplifyPath(p: string): string {
|
||||
// see https://github.com/rust-lang/rust-analyzer/pull/5513#issuecomment-663458818 for why this is needed
|
||||
return path.normalize(p).replace(wsFolder, "${workspaceFolder" + workspaceQualifier + "}");
|
||||
return path.normalize(p).replace(wsFolder, `\${workspaceFolder${workspaceQualifier}}`);
|
||||
}
|
||||
|
||||
const env = prepareEnv(runnable.label, runnableArgs, ctx.config.runnablesExtraEnv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue