diff options
Diffstat (limited to 'crates/rust-analyzer/src/global_state.rs')
-rw-r--r-- | crates/rust-analyzer/src/global_state.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/global_state.rs b/crates/rust-analyzer/src/global_state.rs index ca95d776a..1527c9947 100644 --- a/crates/rust-analyzer/src/global_state.rs +++ b/crates/rust-analyzer/src/global_state.rs | |||
@@ -18,7 +18,7 @@ use ra_vfs::{LineEndings, RootEntry, Vfs, VfsChange, VfsFile, VfsTask, Watch}; | |||
18 | use stdx::format_to; | 18 | use stdx::format_to; |
19 | 19 | ||
20 | use crate::{ | 20 | use crate::{ |
21 | config::Config, | 21 | config::{Config, FilesWatcher}, |
22 | diagnostics::{CheckFixes, DiagnosticCollection}, | 22 | diagnostics::{CheckFixes, DiagnosticCollection}, |
23 | main_loop::pending_requests::{CompletedRequest, LatestRequests}, | 23 | main_loop::pending_requests::{CompletedRequest, LatestRequests}, |
24 | to_proto::url_from_abs_path, | 24 | to_proto::url_from_abs_path, |
@@ -76,7 +76,6 @@ impl GlobalState { | |||
76 | workspaces: Vec<ProjectWorkspace>, | 76 | workspaces: Vec<ProjectWorkspace>, |
77 | lru_capacity: Option<usize>, | 77 | lru_capacity: Option<usize>, |
78 | exclude_globs: &[Glob], | 78 | exclude_globs: &[Glob], |
79 | watch: Watch, | ||
80 | config: Config, | 79 | config: Config, |
81 | ) -> GlobalState { | 80 | ) -> GlobalState { |
82 | let mut change = AnalysisChange::new(); | 81 | let mut change = AnalysisChange::new(); |
@@ -111,6 +110,7 @@ impl GlobalState { | |||
111 | 110 | ||
112 | let (task_sender, task_receiver) = unbounded(); | 111 | let (task_sender, task_receiver) = unbounded(); |
113 | let task_sender = Box::new(move |t| task_sender.send(t).unwrap()); | 112 | let task_sender = Box::new(move |t| task_sender.send(t).unwrap()); |
113 | let watch = Watch(matches!(config.files.watcher, FilesWatcher::Notify)); | ||
114 | let (mut vfs, vfs_roots) = Vfs::new(roots, task_sender, watch); | 114 | let (mut vfs, vfs_roots) = Vfs::new(roots, task_sender, watch); |
115 | 115 | ||
116 | let mut extern_source_roots = FxHashMap::default(); | 116 | let mut extern_source_roots = FxHashMap::default(); |