From 170c7bd7e3784c5dbfb7236e4b8c013cfb10e6ce Mon Sep 17 00:00:00 2001 From: kjeremy Date: Mon, 13 Jan 2020 16:20:47 -0500 Subject: Log client info if present --- crates/ra_lsp_server/src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/ra_lsp_server/src/main.rs b/crates/ra_lsp_server/src/main.rs index cdd925c9f..3879eeff2 100644 --- a/crates/ra_lsp_server/src/main.rs +++ b/crates/ra_lsp_server/src/main.rs @@ -47,6 +47,10 @@ fn run_server() -> Result<()> { let initialize_params = connection.initialize(server_capabilities)?; let initialize_params: lsp_types::InitializeParams = serde_json::from_value(initialize_params)?; + if let Some(client_info) = initialize_params.client_info { + log::info!("Client '{}' {}", client_info.name, client_info.version.unwrap_or_default()); + } + let cwd = std::env::current_dir()?; let root = initialize_params.root_uri.and_then(|it| it.to_file_path().ok()).unwrap_or(cwd); -- cgit v1.2.3