From e8515fecd7a42870f2979c7900c94b59d935901c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 1 Sep 2018 18:16:08 +0300 Subject: split lib --- crates/server/src/main.rs | 37 +++++++------------------------------ 1 file changed, 7 insertions(+), 30 deletions(-) (limited to 'crates/server/src/main.rs') diff --git a/crates/server/src/main.rs b/crates/server/src/main.rs index ecc1f58f8..119f020d3 100644 --- a/crates/server/src/main.rs +++ b/crates/server/src/main.rs @@ -1,38 +1,14 @@ #[macro_use] -extern crate failure; -#[macro_use] -extern crate serde_derive; -extern crate serde; -extern crate serde_json; -extern crate languageserver_types; -extern crate drop_bomb; -#[macro_use] -extern crate crossbeam_channel; -extern crate threadpool; -#[macro_use] extern crate log; -extern crate url_serde; +#[macro_use] +extern crate failure; extern crate flexi_logger; -extern crate walkdir; -extern crate libeditor; -extern crate libanalysis; -extern crate libsyntax2; extern crate gen_lsp_server; -extern crate im; -extern crate relative_path; - -mod caps; -mod req; -mod conv; -mod main_loop; -mod vfs; -mod path_map; -mod server_world; +extern crate m; use flexi_logger::{Logger, Duplicate}; use gen_lsp_server::{run_server, stdio_transport}; - -pub type Result = ::std::result::Result; +use m::Result; fn main() -> Result<()> { Logger::with_env_or_str("m=error") @@ -57,8 +33,8 @@ fn main_inner() -> Result<()> { let (receiver, sender, threads) = stdio_transport(); let root = ::std::env::current_dir()?; run_server( - caps::server_capabilities(), - |r, s| main_loop::main_loop(root, r, s), + m::server_capabilities(), + |r, s| m::main_loop(root, r, s), receiver, sender, )?; @@ -67,3 +43,4 @@ fn main_inner() -> Result<()> { info!("... IO is down"); Ok(()) } + -- cgit v1.2.3