aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r--crates/ra_lsp_server/src/main.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_lsp_server/src/main.rs b/crates/ra_lsp_server/src/main.rs
index 82f52a6e8..4646742ca 100644
--- a/crates/ra_lsp_server/src/main.rs
+++ b/crates/ra_lsp_server/src/main.rs
@@ -6,17 +6,17 @@ use ra_lsp_server::{Result, InitializationOptions};
6use ra_prof; 6use ra_prof;
7 7
8fn main() -> Result<()> { 8fn main() -> Result<()> {
9 ::std::env::set_var("RUST_BACKTRACE", "short"); 9 std::env::set_var("RUST_BACKTRACE", "short");
10 let logger = Logger::with_env_or_str("error").duplicate_to_stderr(Duplicate::All); 10 let logger = Logger::with_env_or_str("error").duplicate_to_stderr(Duplicate::All);
11 match ::std::env::var("RA_INTERNAL_MODE") { 11 match std::env::var("RA_INTERNAL_MODE") {
12 Ok(ref v) if v == "1" => logger.log_to_file().directory("log").start()?, 12 Ok(ref v) if v == "1" => logger.log_to_file().directory("log").start()?,
13 _ => logger.start()?, 13 _ => logger.start()?,
14 }; 14 };
15 let prof_depth = match ::std::env::var("RA_PROFILE_DEPTH") { 15 let prof_depth = match std::env::var("RA_PROFILE_DEPTH") {
16 Ok(ref d) => d.parse()?, 16 Ok(ref d) => d.parse()?,
17 _ => 0, 17 _ => 0,
18 }; 18 };
19 let profile_allowed = match ::std::env::var("RA_PROFILE") { 19 let profile_allowed = match std::env::var("RA_PROFILE") {
20 Ok(ref p) => p.split(";").map(String::from).collect(), 20 Ok(ref p) => p.split(";").map(String::from).collect(),
21 _ => Vec::new(), 21 _ => Vec::new(),
22 }; 22 };
@@ -36,7 +36,7 @@ fn main() -> Result<()> {
36 36
37fn main_inner() -> Result<()> { 37fn main_inner() -> Result<()> {
38 let (receiver, sender, threads) = stdio_transport(); 38 let (receiver, sender, threads) = stdio_transport();
39 let cwd = ::std::env::current_dir()?; 39 let cwd = std::env::current_dir()?;
40 run_server(ra_lsp_server::server_capabilities(), receiver, sender, |params, r, s| { 40 run_server(ra_lsp_server::server_capabilities(), receiver, sender, |params, r, s| {
41 let root = params.root_uri.and_then(|it| it.to_file_path().ok()).unwrap_or(cwd); 41 let root = params.root_uri.and_then(|it| it.to_file_path().ok()).unwrap_or(cwd);
42 42