mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
feat: don't add panics to error jump list by default
To re-enable this, use "rust-analyzer.runnables.problemMatcher": [ "$rustc", "$rust-panic" ], setting. closes: #14977
This commit is contained in:
parent
46cd8b8495
commit
832a64e290
4 changed files with 19 additions and 1 deletions
|
@ -220,6 +220,10 @@ export class Config {
|
|||
return this.get<string[] | undefined>("discoverProjectCommand");
|
||||
}
|
||||
|
||||
get problemMatcher(): string[] {
|
||||
return this.get<string[]>("runnables.problemMatcher") || [];
|
||||
}
|
||||
|
||||
get cargoRunner() {
|
||||
return this.get<string | undefined>("cargoRunner");
|
||||
}
|
||||
|
|
|
@ -151,6 +151,7 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
|
|||
definition,
|
||||
runnable.label,
|
||||
args,
|
||||
config.problemMatcher,
|
||||
config.cargoRunner,
|
||||
true
|
||||
);
|
||||
|
|
|
@ -46,6 +46,7 @@ class CargoTaskProvider implements vscode.TaskProvider {
|
|||
{ type: TASK_TYPE, command: def.command },
|
||||
`cargo ${def.command}`,
|
||||
[def.command],
|
||||
this.config.problemMatcher,
|
||||
this.config.cargoRunner
|
||||
);
|
||||
vscodeTask.group = def.group;
|
||||
|
@ -70,6 +71,7 @@ class CargoTaskProvider implements vscode.TaskProvider {
|
|||
definition,
|
||||
task.name,
|
||||
args,
|
||||
this.config.problemMatcher,
|
||||
this.config.cargoRunner
|
||||
);
|
||||
}
|
||||
|
@ -83,6 +85,7 @@ export async function buildCargoTask(
|
|||
definition: CargoTaskDefinition,
|
||||
name: string,
|
||||
args: string[],
|
||||
problemMatcher: string[],
|
||||
customRunner?: string,
|
||||
throwOnError: boolean = false
|
||||
): Promise<vscode.Task> {
|
||||
|
@ -128,7 +131,7 @@ export async function buildCargoTask(
|
|||
name,
|
||||
TASK_SOURCE,
|
||||
exec,
|
||||
["$rustc", "$rust-panic"]
|
||||
problemMatcher
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue