mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
reformat the world
This commit is contained in:
parent
5cb1d41a30
commit
12e3b4c70b
129 changed files with 727 additions and 2509 deletions
|
@ -36,23 +36,15 @@ struct InitializationOptions {
|
|||
fn main_inner() -> Result<()> {
|
||||
let (receiver, sender, threads) = stdio_transport();
|
||||
let cwd = ::std::env::current_dir()?;
|
||||
run_server(
|
||||
ra_lsp_server::server_capabilities(),
|
||||
receiver,
|
||||
sender,
|
||||
|params, r, s| {
|
||||
let root = params
|
||||
.root_uri
|
||||
.and_then(|it| it.to_file_path().ok())
|
||||
.unwrap_or(cwd);
|
||||
let supports_decorations = params
|
||||
.initialization_options
|
||||
.and_then(|v| InitializationOptions::deserialize(v).ok())
|
||||
.and_then(|it| it.publish_decorations)
|
||||
== Some(true);
|
||||
ra_lsp_server::main_loop(false, root, supports_decorations, r, s)
|
||||
},
|
||||
)?;
|
||||
run_server(ra_lsp_server::server_capabilities(), receiver, sender, |params, r, s| {
|
||||
let root = params.root_uri.and_then(|it| it.to_file_path().ok()).unwrap_or(cwd);
|
||||
let supports_decorations = params
|
||||
.initialization_options
|
||||
.and_then(|v| InitializationOptions::deserialize(v).ok())
|
||||
.and_then(|it| it.publish_decorations)
|
||||
== Some(true);
|
||||
ra_lsp_server::main_loop(false, root, supports_decorations, r, s)
|
||||
})?;
|
||||
log::info!("shutting down IO...");
|
||||
threads.join()?;
|
||||
log::info!("... IO is down");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue