aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/main_loop
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop')
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index 72bb48619..ae51141cb 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -590,6 +590,7 @@ pub fn handle_formatting(
590 let end_position = TextUnit::of_str(&file).conv_with(&file_line_index); 590 let end_position = TextUnit::of_str(&file).conv_with(&file_line_index);
591 591
592 let mut rustfmt = process::Command::new("rustfmt"); 592 let mut rustfmt = process::Command::new("rustfmt");
593 rustfmt.args(&world.options.rustfmt_args);
593 if let Some(&crate_id) = crate_ids.first() { 594 if let Some(&crate_id) = crate_ids.first() {
594 // Assume all crates are in the same edition 595 // Assume all crates are in the same edition
595 let edition = world.analysis().crate_edition(crate_id)?; 596 let edition = world.analysis().crate_edition(crate_id)?;
@@ -923,9 +924,9 @@ fn to_lsp_runnable(
923 let args = runnable_args(world, file_id, &runnable.kind)?; 924 let args = runnable_args(world, file_id, &runnable.kind)?;
924 let line_index = world.analysis().file_line_index(file_id)?; 925 let line_index = world.analysis().file_line_index(file_id)?;
925 let label = match &runnable.kind { 926 let label = match &runnable.kind {
926 RunnableKind::Test { name } => format!("test {}", name), 927 RunnableKind::Test { test_id } => format!("test {}", test_id),
927 RunnableKind::TestMod { path } => format!("test-mod {}", path), 928 RunnableKind::TestMod { path } => format!("test-mod {}", path),
928 RunnableKind::Bench { name } => format!("bench {}", name), 929 RunnableKind::Bench { test_id } => format!("bench {}", test_id),
929 RunnableKind::Bin => "run binary".to_string(), 930 RunnableKind::Bin => "run binary".to_string(),
930 }; 931 };
931 Ok(req::Runnable { 932 Ok(req::Runnable {