aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src/bin/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/rust-analyzer/src/bin/main.rs')
-rw-r--r--crates/rust-analyzer/src/bin/main.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/crates/rust-analyzer/src/bin/main.rs b/crates/rust-analyzer/src/bin/main.rs
index bade31ca2..0e03a0ca8 100644
--- a/crates/rust-analyzer/src/bin/main.rs
+++ b/crates/rust-analyzer/src/bin/main.rs
@@ -60,11 +60,12 @@ fn setup_logging() -> Result<()> {
60} 60}
61 61
62fn run_server() -> Result<()> { 62fn run_server() -> Result<()> {
63 log::info!("lifecycle: server started"); 63 log::info!("server will start");
64 64
65 let (connection, io_threads) = Connection::stdio(); 65 let (connection, io_threads) = Connection::stdio();
66 66
67 let (initialize_id, initialize_params) = connection.initialize_start()?; 67 let (initialize_id, initialize_params) = connection.initialize_start()?;
68 log::info!("InitializeParams: {}", initialize_params);
68 let initialize_params = 69 let initialize_params =
69 from_json::<lsp_types::InitializeParams>("InitializeParams", initialize_params)?; 70 from_json::<lsp_types::InitializeParams>("InitializeParams", initialize_params)?;
70 71
@@ -118,10 +119,9 @@ fn run_server() -> Result<()> {
118 .filter(|workspaces| !workspaces.is_empty()) 119 .filter(|workspaces| !workspaces.is_empty())
119 .unwrap_or_else(|| vec![config.root_path.clone()]); 120 .unwrap_or_else(|| vec![config.root_path.clone()]);
120 121
121 config.linked_projects = ProjectManifest::discover_all(&workspace_roots) 122 let discovered = ProjectManifest::discover_all(&workspace_roots);
122 .into_iter() 123 log::info!("discovered projects: {:?}", discovered);
123 .map(LinkedProject::from) 124 config.linked_projects = discovered.into_iter().map(LinkedProject::from).collect();
124 .collect();
125 } 125 }
126 126
127 config 127 config
@@ -129,8 +129,7 @@ fn run_server() -> Result<()> {
129 129
130 rust_analyzer::main_loop(config, connection)?; 130 rust_analyzer::main_loop(config, connection)?;
131 131
132 log::info!("shutting down IO...");
133 io_threads.join()?; 132 io_threads.join()?;
134 log::info!("... IO is down"); 133 log::info!("server did shut down");
135 Ok(()) 134 Ok(())
136} 135}