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.rs10
-rw-r--r--crates/ra_lsp_server/src/main_loop/pending_requests.rs2
-rw-r--r--crates/ra_lsp_server/src/main_loop/subscriptions.rs3
3 files changed, 9 insertions, 6 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),
diff --git a/crates/ra_lsp_server/src/main_loop/pending_requests.rs b/crates/ra_lsp_server/src/main_loop/pending_requests.rs
index 2d2213464..73b33e419 100644
--- a/crates/ra_lsp_server/src/main_loop/pending_requests.rs
+++ b/crates/ra_lsp_server/src/main_loop/pending_requests.rs
@@ -1,4 +1,4 @@
1//! Datastructures that keep track of inflight requests. 1//! Data structures that keep track of inflight requests.
2 2
3use std::time::{Duration, Instant}; 3use std::time::{Duration, Instant};
4 4
diff --git a/crates/ra_lsp_server/src/main_loop/subscriptions.rs b/crates/ra_lsp_server/src/main_loop/subscriptions.rs
index b0bae90f5..bee6437cf 100644
--- a/crates/ra_lsp_server/src/main_loop/subscriptions.rs
+++ b/crates/ra_lsp_server/src/main_loop/subscriptions.rs
@@ -1,4 +1,5 @@
1//! Keeps track of file subscriptions. 1//! Keeps track of file subscriptions -- the set of currently opened files for
2//! which we want to publish diagnostics, syntax highlighting, etc.
2 3
3use ra_ide::FileId; 4use ra_ide::FileId;
4use rustc_hash::FxHashSet; 5use rustc_hash::FxHashSet;