aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/main_loop/handlers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop/handlers.rs')
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index ae51141cb..bb7bab372 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -1,5 +1,6 @@
1//! This module is responsible for implementing handlers for Lanuage Server Protocol. 1//! This module is responsible for implementing handlers for Language Server
2//! The majority of requests are fulfilled by calling into the `ra_ide` crate. 2//! Protocol. The majority of requests are fulfilled by calling into the
3//! `ra_ide` crate.
3 4
4use std::{ 5use std::{
5 collections::hash_map::Entry, 6 collections::hash_map::Entry,
@@ -29,7 +30,7 @@ use serde::{Deserialize, Serialize};
29use serde_json::to_value; 30use serde_json::to_value;
30 31
31use crate::{ 32use crate::{
32 cargo_target_spec::{runnable_args, CargoTargetSpec}, 33 cargo_target_spec::CargoTargetSpec,
33 conv::{ 34 conv::{
34 to_call_hierarchy_item, to_location, Conv, ConvWith, FoldConvCtx, MapConvWith, TryConvWith, 35 to_call_hierarchy_item, to_location, Conv, ConvWith, FoldConvCtx, MapConvWith, TryConvWith,
35 TryConvWithToVec, 36 TryConvWithToVec,
@@ -921,7 +922,8 @@ fn to_lsp_runnable(
921 file_id: FileId, 922 file_id: FileId,
922 runnable: Runnable, 923 runnable: Runnable,
923) -> Result<req::Runnable> { 924) -> Result<req::Runnable> {
924 let args = runnable_args(world, file_id, &runnable.kind)?; 925 let spec = CargoTargetSpec::for_file(world, file_id)?;
926 let args = CargoTargetSpec::runnable_args(spec, &runnable.kind)?;
925 let line_index = world.analysis().file_line_index(file_id)?; 927 let line_index = world.analysis().file_line_index(file_id)?;
926 let label = match &runnable.kind { 928 let label = match &runnable.kind {
927 RunnableKind::Test { test_id } => format!("test {}", test_id), 929 RunnableKind::Test { test_id } => format!("test {}", test_id),