mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 21:54:42 +00:00
Merge #2829
2829: Log client info if present r=matklad a=kjeremy Co-authored-by: kjeremy <kjeremy@gmail.com>
This commit is contained in:
commit
d8d8c20077
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue