diff options
author | Aleksey Kladov <[email protected]> | 2018-09-01 16:16:08 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-09-01 16:16:08 +0100 |
commit | e8515fecd7a42870f2979c7900c94b59d935901c (patch) | |
tree | 42ef7161eaa642f03e098cab29e7bf629686e07a /crates/server/src/main.rs | |
parent | 4268fbeaa1e9f98e033c72afce5dc8333da4b4b7 (diff) |
split lib
Diffstat (limited to 'crates/server/src/main.rs')
-rw-r--r-- | crates/server/src/main.rs | 37 |
1 files changed, 7 insertions, 30 deletions
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 @@ | |||
1 | #[macro_use] | 1 | #[macro_use] |
2 | extern crate failure; | ||
3 | #[macro_use] | ||
4 | extern crate serde_derive; | ||
5 | extern crate serde; | ||
6 | extern crate serde_json; | ||
7 | extern crate languageserver_types; | ||
8 | extern crate drop_bomb; | ||
9 | #[macro_use] | ||
10 | extern crate crossbeam_channel; | ||
11 | extern crate threadpool; | ||
12 | #[macro_use] | ||
13 | extern crate log; | 2 | extern crate log; |
14 | extern crate url_serde; | 3 | #[macro_use] |
4 | extern crate failure; | ||
15 | extern crate flexi_logger; | 5 | extern crate flexi_logger; |
16 | extern crate walkdir; | ||
17 | extern crate libeditor; | ||
18 | extern crate libanalysis; | ||
19 | extern crate libsyntax2; | ||
20 | extern crate gen_lsp_server; | 6 | extern crate gen_lsp_server; |
21 | extern crate im; | 7 | extern crate m; |
22 | extern crate relative_path; | ||
23 | |||
24 | mod caps; | ||
25 | mod req; | ||
26 | mod conv; | ||
27 | mod main_loop; | ||
28 | mod vfs; | ||
29 | mod path_map; | ||
30 | mod server_world; | ||
31 | 8 | ||
32 | use flexi_logger::{Logger, Duplicate}; | 9 | use flexi_logger::{Logger, Duplicate}; |
33 | use gen_lsp_server::{run_server, stdio_transport}; | 10 | use gen_lsp_server::{run_server, stdio_transport}; |
34 | 11 | use m::Result; | |
35 | pub type Result<T> = ::std::result::Result<T, ::failure::Error>; | ||
36 | 12 | ||
37 | fn main() -> Result<()> { | 13 | fn main() -> Result<()> { |
38 | Logger::with_env_or_str("m=error") | 14 | Logger::with_env_or_str("m=error") |
@@ -57,8 +33,8 @@ fn main_inner() -> Result<()> { | |||
57 | let (receiver, sender, threads) = stdio_transport(); | 33 | let (receiver, sender, threads) = stdio_transport(); |
58 | let root = ::std::env::current_dir()?; | 34 | let root = ::std::env::current_dir()?; |
59 | run_server( | 35 | run_server( |
60 | caps::server_capabilities(), | 36 | m::server_capabilities(), |
61 | |r, s| main_loop::main_loop(root, r, s), | 37 | |r, s| m::main_loop(root, r, s), |
62 | receiver, | 38 | receiver, |
63 | sender, | 39 | sender, |
64 | )?; | 40 | )?; |
@@ -67,3 +43,4 @@ fn main_inner() -> Result<()> { | |||
67 | info!("... IO is down"); | 43 | info!("... IO is down"); |
68 | Ok(()) | 44 | Ok(()) |
69 | } | 45 | } |
46 | |||