Skip to content

Commit 4fb7674

Browse files
fix: show the right check-command
Signed-off-by: Florian-Schoenherr <florian.schoenherr99@gmail.com>
1 parent 3c786bd commit 4fb7674

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

crates/rust-analyzer/src/main_loop.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,19 @@ impl GlobalState {
406406
// When we're running multiple flychecks, we have to include a disambiguator in
407407
// the title, or the editor complains. Note that this is a user-facing string.
408408
let title = if self.flycheck.len() == 1 {
409-
"cargo check".to_string()
409+
match self.config.flycheck() {
410+
Some(flycheck::FlycheckConfig::CargoCommand {
411+
command,
412+
..
413+
}) => {
414+
format!("cargo {}", command)
415+
}
416+
Some(flycheck::FlycheckConfig::CustomCommand {
417+
command,
418+
..
419+
}) => command,
420+
None => "cargo check".to_string(),
421+
}
410422
} else {
411423
format!("cargo check (#{})", id + 1)
412424
};

0 commit comments

Comments
 (0)