diff options
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r-- | crates/ra_lsp_server/src/main.rs | 4 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/mod.rs | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/crates/ra_lsp_server/src/main.rs b/crates/ra_lsp_server/src/main.rs index c547764f6..e5d1792b7 100644 --- a/crates/ra_lsp_server/src/main.rs +++ b/crates/ra_lsp_server/src/main.rs | |||
@@ -35,14 +35,14 @@ fn main_inner() -> Result<()> { | |||
35 | let cwd = ::std::env::current_dir()?; | 35 | let cwd = ::std::env::current_dir()?; |
36 | run_server( | 36 | run_server( |
37 | ra_lsp_server::server_capabilities(), | 37 | ra_lsp_server::server_capabilities(), |
38 | receiver, | ||
39 | sender, | ||
38 | |params, r, s| { | 40 | |params, r, s| { |
39 | let root = params.root_uri | 41 | let root = params.root_uri |
40 | .and_then(|it| it.to_file_path().ok()) | 42 | .and_then(|it| it.to_file_path().ok()) |
41 | .unwrap_or(cwd); | 43 | .unwrap_or(cwd); |
42 | ra_lsp_server::main_loop(false, root, r, s) | 44 | ra_lsp_server::main_loop(false, root, r, s) |
43 | }, | 45 | }, |
44 | receiver, | ||
45 | sender, | ||
46 | )?; | 46 | )?; |
47 | info!("shutting down IO..."); | 47 | info!("shutting down IO..."); |
48 | threads.join()?; | 48 | threads.join()?; |
diff --git a/crates/ra_lsp_server/src/main_loop/mod.rs b/crates/ra_lsp_server/src/main_loop/mod.rs index abc58b70e..47a9b202e 100644 --- a/crates/ra_lsp_server/src/main_loop/mod.rs +++ b/crates/ra_lsp_server/src/main_loop/mod.rs | |||
@@ -35,8 +35,8 @@ enum Task { | |||
35 | pub fn main_loop( | 35 | pub fn main_loop( |
36 | internal_mode: bool, | 36 | internal_mode: bool, |
37 | root: PathBuf, | 37 | root: PathBuf, |
38 | msg_receriver: &mut Receiver<RawMessage>, | 38 | msg_receriver: &Receiver<RawMessage>, |
39 | msg_sender: &mut Sender<RawMessage>, | 39 | msg_sender: &Sender<RawMessage>, |
40 | ) -> Result<()> { | 40 | ) -> Result<()> { |
41 | let pool = rayon::ThreadPoolBuilder::new() | 41 | let pool = rayon::ThreadPoolBuilder::new() |
42 | .num_threads(4) | 42 | .num_threads(4) |
@@ -88,8 +88,8 @@ fn main_loop_inner( | |||
88 | internal_mode: bool, | 88 | internal_mode: bool, |
89 | ws_root: PathBuf, | 89 | ws_root: PathBuf, |
90 | pool: &ThreadPool, | 90 | pool: &ThreadPool, |
91 | msg_sender: &mut Sender<RawMessage>, | 91 | msg_sender: &Sender<RawMessage>, |
92 | msg_receiver: &mut Receiver<RawMessage>, | 92 | msg_receiver: &Receiver<RawMessage>, |
93 | task_sender: Sender<Task>, | 93 | task_sender: Sender<Task>, |
94 | task_receiver: Receiver<Task>, | 94 | task_receiver: Receiver<Task>, |
95 | fs_worker: Worker<PathBuf, (PathBuf, Vec<FileEvent>)>, | 95 | fs_worker: Worker<PathBuf, (PathBuf, Vec<FileEvent>)>, |
@@ -212,7 +212,7 @@ fn main_loop_inner( | |||
212 | 212 | ||
213 | fn on_task( | 213 | fn on_task( |
214 | task: Task, | 214 | task: Task, |
215 | msg_sender: &mut Sender<RawMessage>, | 215 | msg_sender: &Sender<RawMessage>, |
216 | pending_requests: &mut HashMap<u64, JobHandle>, | 216 | pending_requests: &mut HashMap<u64, JobHandle>, |
217 | ) { | 217 | ) { |
218 | match task { | 218 | match task { |
@@ -266,7 +266,7 @@ fn on_request( | |||
266 | } | 266 | } |
267 | 267 | ||
268 | fn on_notification( | 268 | fn on_notification( |
269 | msg_sender: &mut Sender<RawMessage>, | 269 | msg_sender: &Sender<RawMessage>, |
270 | state: &mut ServerWorldState, | 270 | state: &mut ServerWorldState, |
271 | pending_requests: &mut HashMap<u64, JobHandle>, | 271 | pending_requests: &mut HashMap<u64, JobHandle>, |
272 | subs: &mut Subscriptions, | 272 | subs: &mut Subscriptions, |