aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/main_loop.rs
diff options
context:
space:
mode:
authorEmil Lauridsen <[email protected]>2019-12-27 10:10:07 +0000
committerEmil Lauridsen <[email protected]>2019-12-27 10:10:07 +0000
commit428a6ff5b8bad2c80a3522599195bf2a393f744e (patch)
tree9707dd343b8f00f01041a7995536aac84b137291 /crates/ra_lsp_server/src/main_loop.rs
parent0cdbd0814958e174c5481d6bf16bd2a7e53ec981 (diff)
Move cargo watch functionality to separate crate
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop.rs')
-rw-r--r--crates/ra_lsp_server/src/main_loop.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs
index c58af7e47..e66b8f9eb 100644
--- a/crates/ra_lsp_server/src/main_loop.rs
+++ b/crates/ra_lsp_server/src/main_loop.rs
@@ -10,6 +10,7 @@ use std::{error::Error, fmt, panic, path::PathBuf, sync::Arc, time::Instant};
10use crossbeam_channel::{select, unbounded, RecvError, Sender}; 10use crossbeam_channel::{select, unbounded, RecvError, Sender};
11use lsp_server::{Connection, ErrorCode, Message, Notification, Request, RequestId, Response}; 11use lsp_server::{Connection, ErrorCode, Message, Notification, Request, RequestId, Response};
12use lsp_types::{ClientCapabilities, NumberOrString}; 12use lsp_types::{ClientCapabilities, NumberOrString};
13use ra_cargo_watch::{CheckOptions, CheckTask};
13use ra_ide::{Canceled, FeatureFlags, FileId, LibraryData, SourceRootId}; 14use ra_ide::{Canceled, FeatureFlags, FileId, LibraryData, SourceRootId};
14use ra_prof::profile; 15use ra_prof::profile;
15use ra_vfs::{VfsTask, Watch}; 16use ra_vfs::{VfsTask, Watch};
@@ -19,7 +20,6 @@ use serde::{de::DeserializeOwned, Serialize};
19use threadpool::ThreadPool; 20use threadpool::ThreadPool;
20 21
21use crate::{ 22use crate::{
22 cargo_check::CheckTask,
23 main_loop::{ 23 main_loop::{
24 pending_requests::{PendingRequest, PendingRequests}, 24 pending_requests::{PendingRequest, PendingRequests},
25 subscriptions::Subscriptions, 25 subscriptions::Subscriptions,
@@ -127,10 +127,12 @@ pub fn main_loop(
127 .and_then(|it| it.line_folding_only) 127 .and_then(|it| it.line_folding_only)
128 .unwrap_or(false), 128 .unwrap_or(false),
129 max_inlay_hint_length: config.max_inlay_hint_length, 129 max_inlay_hint_length: config.max_inlay_hint_length,
130 cargo_watch_enable: config.cargo_watch_enable, 130 cargo_watch: CheckOptions {
131 cargo_watch_args: config.cargo_watch_args, 131 enable: config.cargo_watch_enable,
132 cargo_watch_command: config.cargo_watch_command, 132 args: config.cargo_watch_args,
133 cargo_watch_all_targets: config.cargo_watch_all_targets, 133 command: config.cargo_watch_command,
134 all_targets: config.cargo_watch_all_targets,
135 },
134 } 136 }
135 }; 137 };
136 138