aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-03 16:19:00 +0100
committerAleksey Kladov <[email protected]>2020-07-03 16:19:00 +0100
commitb8ef8539a6fb2ba9bbeeade460a08928abd6cc1b (patch)
tree8c917fb2a9f2595405f5eaaf6b1640e61ce09d33 /crates
parentf5a4a4b46e706697abe4bd136503ecc09aa23b61 (diff)
Fix workspace reloading
Diffstat (limited to 'crates')
-rw-r--r--crates/rust-analyzer/src/config.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 21acfe644..0c7c36716 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -9,7 +9,6 @@
9 9
10use std::{ffi::OsString, path::PathBuf}; 10use std::{ffi::OsString, path::PathBuf};
11 11
12use crate::diagnostics::DiagnosticsConfig;
13use flycheck::FlycheckConfig; 12use flycheck::FlycheckConfig;
14use lsp_types::ClientCapabilities; 13use lsp_types::ClientCapabilities;
15use ra_db::AbsPathBuf; 14use ra_db::AbsPathBuf;
@@ -17,6 +16,8 @@ use ra_ide::{AssistConfig, CompletionConfig, HoverConfig, InlayHintsConfig};
17use ra_project_model::{CargoConfig, ProjectJson, ProjectJsonData, ProjectManifest}; 16use ra_project_model::{CargoConfig, ProjectJson, ProjectJsonData, ProjectManifest};
18use serde::Deserialize; 17use serde::Deserialize;
19 18
19use crate::diagnostics::DiagnosticsConfig;
20
20#[derive(Debug, Clone)] 21#[derive(Debug, Clone)]
21pub struct Config { 22pub struct Config {
22 pub client_caps: ClientCapsConfig, 23 pub client_caps: ClientCapsConfig,
@@ -182,8 +183,10 @@ impl Config {
182 log::info!("Config::update({:#})", value); 183 log::info!("Config::update({:#})", value);
183 184
184 let client_caps = self.client_caps.clone(); 185 let client_caps = self.client_caps.clone();
186 let linked_projects = self.linked_projects.clone();
185 *self = Config::new(self.root_path.clone()); 187 *self = Config::new(self.root_path.clone());
186 self.client_caps = client_caps; 188 self.client_caps = client_caps;
189 self.linked_projects = linked_projects;
187 190
188 set(value, "/withSysroot", &mut self.with_sysroot); 191 set(value, "/withSysroot", &mut self.with_sysroot);
189 set(value, "/diagnostics/enable", &mut self.publish_diagnostics); 192 set(value, "/diagnostics/enable", &mut self.publish_diagnostics);