From b8ef8539a6fb2ba9bbeeade460a08928abd6cc1b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 3 Jul 2020 17:19:00 +0200 Subject: Fix workspace reloading --- crates/rust-analyzer/src/config.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crates') 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 @@ use std::{ffi::OsString, path::PathBuf}; -use crate::diagnostics::DiagnosticsConfig; use flycheck::FlycheckConfig; use lsp_types::ClientCapabilities; use ra_db::AbsPathBuf; @@ -17,6 +16,8 @@ use ra_ide::{AssistConfig, CompletionConfig, HoverConfig, InlayHintsConfig}; use ra_project_model::{CargoConfig, ProjectJson, ProjectJsonData, ProjectManifest}; use serde::Deserialize; +use crate::diagnostics::DiagnosticsConfig; + #[derive(Debug, Clone)] pub struct Config { pub client_caps: ClientCapsConfig, @@ -182,8 +183,10 @@ impl Config { log::info!("Config::update({:#})", value); let client_caps = self.client_caps.clone(); + let linked_projects = self.linked_projects.clone(); *self = Config::new(self.root_path.clone()); self.client_caps = client_caps; + self.linked_projects = linked_projects; set(value, "/withSysroot", &mut self.with_sysroot); set(value, "/diagnostics/enable", &mut self.publish_diagnostics); -- cgit v1.2.3