diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-01-13 21:44:20 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-01-13 21:44:20 +0000 |
commit | d8d8c20077702b8537086d49914d02654a46ebc5 (patch) | |
tree | e8d146b0059e619aac84af13a0fd3fd858825769 /crates | |
parent | ea0ee8e5bf99bb491875a3539ffdcb39eb0b5397 (diff) | |
parent | 170c7bd7e3784c5dbfb7236e4b8c013cfb10e6ce (diff) |
Merge #2829
2829: Log client info if present r=matklad a=kjeremy
Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'crates')
-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 | ||