Skip to content

Commit 8996107

Browse files
Merge #10731
10731: fix: show the right check-command r=Veykril a=Florian-Schoenherr Currenty r.a. only shows this: ![image](https://user-images.githubusercontent.com/65456722/140977478-e6bc8a45-7c25-4578-9406-fb34f1eb0792.png) even if another command was specified There might be a better way to do this, I tried. Co-authored-by: Florian-Schoenherr <florian.schoenherr99@gmail.com>
2 parents c747512 + 4fb7674 commit 8996107

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)