aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r--crates/ra_lsp_server/src/main.rs7
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs2
2 files changed, 1 insertions, 8 deletions
diff --git a/crates/ra_lsp_server/src/main.rs b/crates/ra_lsp_server/src/main.rs
index e13c8ca14..8076a7fa5 100644
--- a/crates/ra_lsp_server/src/main.rs
+++ b/crates/ra_lsp_server/src/main.rs
@@ -1,6 +1,5 @@
1//! `ra_lsp_server` binary 1//! `ra_lsp_server` binary
2 2
3use flexi_logger::{Duplicate, Logger};
4use lsp_server::Connection; 3use lsp_server::Connection;
5use ra_lsp_server::{show_message, Result, ServerConfig}; 4use ra_lsp_server::{show_message, Result, ServerConfig};
6use ra_prof; 5use ra_prof;
@@ -14,11 +13,7 @@ fn main() -> Result<()> {
14fn setup_logging() -> Result<()> { 13fn setup_logging() -> Result<()> {
15 std::env::set_var("RUST_BACKTRACE", "short"); 14 std::env::set_var("RUST_BACKTRACE", "short");
16 15
17 let logger = Logger::with_env_or_str("error").duplicate_to_stderr(Duplicate::All); 16 env_logger::try_init()?;
18 match std::env::var("RA_LOG_DIR") {
19 Ok(ref v) if v == "1" => logger.log_to_file().directory("log").start()?,
20 _ => logger.start()?,
21 };
22 17
23 ra_prof::set_filter(match std::env::var("RA_PROFILE") { 18 ra_prof::set_filter(match std::env::var("RA_PROFILE") {
24 Ok(spec) => ra_prof::Filter::from_spec(&spec), 19 Ok(spec) => ra_prof::Filter::from_spec(&spec),
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index c81fa7f67..ca47ff5e1 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -480,8 +480,6 @@ pub fn handle_prepare_rename(
480 let _p = profile("handle_prepare_rename"); 480 let _p = profile("handle_prepare_rename");
481 let position = params.try_conv_with(&world)?; 481 let position = params.try_conv_with(&world)?;
482 482
483 // We support renaming references like handle_rename does.
484 // In the future we may want to reject the renaming of things like keywords here too.
485 let optional_change = world.analysis().rename(position, "dummy")?; 483 let optional_change = world.analysis().rename(position, "dummy")?;
486 let range = match optional_change { 484 let range = match optional_change {
487 None => return Ok(None), 485 None => return Ok(None),