mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Add runnable env support.
This commit is contained in:
parent
57576ac420
commit
7b79d24ad5
4 changed files with 69 additions and 11 deletions
|
@ -5,6 +5,8 @@ export type UpdatesChannel = "stable" | "nightly";
|
|||
|
||||
export const NIGHTLY_TAG = "nightly";
|
||||
|
||||
export type RunnableEnvCfg = Record<string, string> | [{ mask?: string, env: Record<string, string>; }]
|
||||
|
||||
export class Config {
|
||||
readonly extensionId = "matklad.rust-analyzer";
|
||||
|
||||
|
@ -114,6 +116,10 @@ export class Config {
|
|||
return this.get<string | undefined>("cargoRunner");
|
||||
}
|
||||
|
||||
get runnableEnv() {
|
||||
return this.get<RunnableEnvCfg | undefined>("runnableEnv");
|
||||
}
|
||||
|
||||
get debug() {
|
||||
// "/rustc/<id>" used by suggestions only.
|
||||
const { ["/rustc/<id>"]: _, ...sourceFileMap } = this.get<Record<string, string>>("debug.sourceFileMap");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue