diff options
author | kjeremy <[email protected]> | 2020-01-13 21:20:47 +0000 |
---|---|---|
committer | kjeremy <[email protected]> | 2020-01-13 21:20:47 +0000 |
commit | 170c7bd7e3784c5dbfb7236e4b8c013cfb10e6ce (patch) | |
tree | e8d146b0059e619aac84af13a0fd3fd858825769 /crates/ra_lsp_server | |
parent | ea0ee8e5bf99bb491875a3539ffdcb39eb0b5397 (diff) |
Log client info if present
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r-- | crates/ra_lsp_server/src/main.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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<()> { | |||
47 | let initialize_params = connection.initialize(server_capabilities)?; | 47 | let initialize_params = connection.initialize(server_capabilities)?; |
48 | let initialize_params: lsp_types::InitializeParams = serde_json::from_value(initialize_params)?; | 48 | let initialize_params: lsp_types::InitializeParams = serde_json::from_value(initialize_params)?; |
49 | 49 | ||
50 | if let Some(client_info) = initialize_params.client_info { | ||
51 | log::info!("Client '{}' {}", client_info.name, client_info.version.unwrap_or_default()); | ||
52 | } | ||
53 | |||
50 | let cwd = std::env::current_dir()?; | 54 | let cwd = std::env::current_dir()?; |
51 | let root = initialize_params.root_uri.and_then(|it| it.to_file_path().ok()).unwrap_or(cwd); | 55 | let root = initialize_params.root_uri.and_then(|it| it.to_file_path().ok()).unwrap_or(cwd); |
52 | 56 | ||