diff options
Diffstat (limited to 'crates/ra_lsp_server/src/world.rs')
-rw-r--r-- | crates/ra_lsp_server/src/world.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/crates/ra_lsp_server/src/world.rs b/crates/ra_lsp_server/src/world.rs index 39a07c01a..4b3959e38 100644 --- a/crates/ra_lsp_server/src/world.rs +++ b/crates/ra_lsp_server/src/world.rs | |||
@@ -12,6 +12,7 @@ use crossbeam_channel::{unbounded, Receiver}; | |||
12 | use lsp_server::ErrorCode; | 12 | use lsp_server::ErrorCode; |
13 | use lsp_types::Url; | 13 | use lsp_types::Url; |
14 | use parking_lot::RwLock; | 14 | use parking_lot::RwLock; |
15 | use ra_cargo_watch::{CheckOptions, CheckWatcher, CheckWatcherSharedState}; | ||
15 | use ra_ide::{ | 16 | use ra_ide::{ |
16 | Analysis, AnalysisChange, AnalysisHost, CrateGraph, FeatureFlags, FileId, LibraryData, | 17 | Analysis, AnalysisChange, AnalysisHost, CrateGraph, FeatureFlags, FileId, LibraryData, |
17 | SourceRootId, | 18 | SourceRootId, |
@@ -23,7 +24,6 @@ use relative_path::RelativePathBuf; | |||
23 | use std::path::{Component, Prefix}; | 24 | use std::path::{Component, Prefix}; |
24 | 25 | ||
25 | use crate::{ | 26 | use crate::{ |
26 | cargo_check::{CheckWatcher, CheckWatcherSharedState}, | ||
27 | main_loop::pending_requests::{CompletedRequest, LatestRequests}, | 27 | main_loop::pending_requests::{CompletedRequest, LatestRequests}, |
28 | LspError, Result, | 28 | LspError, Result, |
29 | }; | 29 | }; |
@@ -35,10 +35,7 @@ pub struct Options { | |||
35 | pub supports_location_link: bool, | 35 | pub supports_location_link: bool, |
36 | pub line_folding_only: bool, | 36 | pub line_folding_only: bool, |
37 | pub max_inlay_hint_length: Option<usize>, | 37 | pub max_inlay_hint_length: Option<usize>, |
38 | pub cargo_watch_enable: bool, | 38 | pub cargo_watch: CheckOptions, |
39 | pub cargo_watch_args: Vec<String>, | ||
40 | pub cargo_watch_command: String, | ||
41 | pub cargo_watch_all_targets: bool, | ||
42 | } | 39 | } |
43 | 40 | ||
44 | /// `WorldState` is the primary mutable state of the language server | 41 | /// `WorldState` is the primary mutable state of the language server |
@@ -135,7 +132,8 @@ impl WorldState { | |||
135 | change.set_crate_graph(crate_graph); | 132 | change.set_crate_graph(crate_graph); |
136 | 133 | ||
137 | // FIXME: Figure out the multi-workspace situation | 134 | // FIXME: Figure out the multi-workspace situation |
138 | let check_watcher = CheckWatcher::new(&options, folder_roots.first().cloned().unwrap()); | 135 | let check_watcher = |
136 | CheckWatcher::new(&options.cargo_watch, folder_roots.first().cloned().unwrap()); | ||
139 | 137 | ||
140 | let mut analysis_host = AnalysisHost::new(lru_capacity, feature_flags); | 138 | let mut analysis_host = AnalysisHost::new(lru_capacity, feature_flags); |
141 | analysis_host.apply_change(change); | 139 | analysis_host.apply_change(change); |