Use rust-analyzer's flycheck as source of cargo diagnostics (#29779)
Follow-up of https://github.com/zed-industries/zed/pull/29706 Instead of doing `cargo check` manually, use rust-analyzer's flycheck: at the cost of more sophisticated check command configuration, we keep much less code in Zed, and get a proper progress report. User-facing UI does not change except `diagnostics_fetch_command` and `env` settings removed from the diagnostics settings. Release Notes: - N/A
This commit is contained in:
@@ -935,22 +935,9 @@
|
||||
"max_severity": null
|
||||
},
|
||||
"rust": {
|
||||
// When enabled, Zed runs `cargo check --message-format=json`-based commands and
|
||||
// collect cargo diagnostics instead of rust-analyzer.
|
||||
"fetch_cargo_diagnostics": false,
|
||||
// A command override for fetching the cargo diagnostics.
|
||||
// First argument is the command, followed by the arguments.
|
||||
"diagnostics_fetch_command": [
|
||||
"cargo",
|
||||
"check",
|
||||
"--quiet",
|
||||
"--workspace",
|
||||
"--message-format=json",
|
||||
"--all-targets",
|
||||
"--keep-going"
|
||||
],
|
||||
// Extra environment variables to pass to the diagnostics fetch command.
|
||||
"env": {}
|
||||
// When enabled, Zed disables rust-analyzer's check on save and starts to query
|
||||
// Cargo diagnostics separately.
|
||||
"fetch_cargo_diagnostics": false
|
||||
}
|
||||
},
|
||||
// Files or globs of files that will be excluded by Zed entirely. They will be skipped during file
|
||||
|
||||
Reference in New Issue
Block a user