aboutsummaryrefslogtreecommitdiff
path: root/crates/server/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/server/src/main.rs')
-rw-r--r--crates/server/src/main.rs37
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]
2extern crate failure;
3#[macro_use]
4extern crate serde_derive;
5extern crate serde;
6extern crate serde_json;
7extern crate languageserver_types;
8extern crate drop_bomb;
9#[macro_use]
10extern crate crossbeam_channel;
11extern crate threadpool;
12#[macro_use]
13extern crate log; 2extern crate log;
14extern crate url_serde; 3#[macro_use]
4extern crate failure;
15extern crate flexi_logger; 5extern crate flexi_logger;
16extern crate walkdir;
17extern crate libeditor;
18extern crate libanalysis;
19extern crate libsyntax2;
20extern crate gen_lsp_server; 6extern crate gen_lsp_server;
21extern crate im; 7extern crate m;
22extern crate relative_path;
23
24mod caps;
25mod req;
26mod conv;
27mod main_loop;
28mod vfs;
29mod path_map;
30mod server_world;
31 8
32use flexi_logger::{Logger, Duplicate}; 9use flexi_logger::{Logger, Duplicate};
33use gen_lsp_server::{run_server, stdio_transport}; 10use gen_lsp_server::{run_server, stdio_transport};
34 11use m::Result;
35pub type Result<T> = ::std::result::Result<T, ::failure::Error>;
36 12
37fn main() -> Result<()> { 13fn 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