aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src/main_loop.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-10 17:48:39 +0100
committerAleksey Kladov <[email protected]>2020-07-10 21:30:24 +0100
commit86bc4d20b30b8deb7783c200ad9f5d3acf019116 (patch)
treefa25cf01edc141a11405af52c5501e9209f01d5a /crates/rust-analyzer/src/main_loop.rs
parentc1eed627d909e897309b3d50654a592505654147 (diff)
Also reload when adding new examples, tests, etc
Diffstat (limited to 'crates/rust-analyzer/src/main_loop.rs')
-rw-r--r--crates/rust-analyzer/src/main_loop.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index 96e2399ce..cea03fb6b 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -22,6 +22,7 @@ use crate::{
22 Result, 22 Result,
23}; 23};
24use ra_project_model::ProjectWorkspace; 24use ra_project_model::ProjectWorkspace;
25use vfs::ChangeKind;
25 26
26pub fn main_loop(config: Config, connection: Connection) -> Result<()> { 27pub fn main_loop(config: Config, connection: Connection) -> Result<()> {
27 log::info!("initial config: {:#?}", config); 28 log::info!("initial config: {:#?}", config);
@@ -428,7 +429,9 @@ impl GlobalState {
428 if let Some(flycheck) = &this.flycheck { 429 if let Some(flycheck) = &this.flycheck {
429 flycheck.handle.update(); 430 flycheck.handle.update();
430 } 431 }
431 this.maybe_refresh(params.text_document.uri.as_str()); 432 if let Ok(abs_path) = from_proto::abs_path(&params.text_document.uri) {
433 this.maybe_refresh(&[(abs_path, ChangeKind::Modify)]);
434 }
432 Ok(()) 435 Ok(())
433 })? 436 })?
434 .on::<lsp_types::notification::DidChangeConfiguration>(|this, _params| { 437 .on::<lsp_types::notification::DidChangeConfiguration>(|this, _params| {