aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-10-25 09:01:37 +0100
committerAleksey Kladov <[email protected]>2018-10-25 09:01:37 +0100
commit48fa1f8ba0bfe721bae081b56b1d32586f711fe4 (patch)
tree73c0472a892cdd41b8104909794578f5b33b57f5
parent6660101554261800a6086156c1685ce6f6f217db (diff)
More informative lable for check runnable
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index 9d7f4f9f1..4ac08e527 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -269,14 +269,21 @@ pub fn handle_runnables(
269 res.push(r); 269 res.push(r);
270 } 270 }
271 let mut check_args = vec!["check".to_string()]; 271 let mut check_args = vec!["check".to_string()];
272 let label;
272 match CargoTargetSpec::for_file(&world, file_id)? { 273 match CargoTargetSpec::for_file(&world, file_id)? {
273 Some(spec) => spec.push_to(&mut check_args), 274 Some(spec) => {
274 None => check_args.push("--all".to_string()), 275 label = format!("cargo check -p {}", spec.package);
276 spec.push_to(&mut check_args);
277 }
278 None => {
279 label = "cargo check --all".to_string();
280 check_args.push("--all".to_string())
281 }
275 } 282 }
276 // Always add `cargo check`. 283 // Always add `cargo check`.
277 res.push(req::Runnable { 284 res.push(req::Runnable {
278 range: Default::default(), 285 range: Default::default(),
279 label: "cargo check".to_string(), 286 label,
280 bin: "cargo".to_string(), 287 bin: "cargo".to_string(),
281 args: check_args, 288 args: check_args,
282 env: FxHashMap::default(), 289 env: FxHashMap::default(),