diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2022-05-06 09:46:02 +0300 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2022-05-06 09:49:03 +0300 |
| commit | 97cdf3eb0e766e375b04a0b9bc1184299e6f0404 (patch) | |
| tree | 651e850f38350b20cae140748ba8bf1bdd0de93b | |
| parent | dd3f5e09933c8a1e169173bc564dae8f6ff5bb0f (diff) | |
| download | rust-97cdf3eb0e766e375b04a0b9bc1184299e6f0404.tar.gz rust-97cdf3eb0e766e375b04a0b9bc1184299e6f0404.zip | |
Try not to invalidate our state when the proc macro preference didn't change
| -rw-r--r-- | crates/rust-analyzer/src/reload.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs index c2a6a3fe301..c2a521bbf54 100644 --- a/crates/rust-analyzer/src/reload.rs +++ b/crates/rust-analyzer/src/reload.rs @@ -55,10 +55,13 @@ impl GlobalState { self.reload_flycheck(); } - // Apply experimental feature flags. - self.analysis_host - .raw_database_mut() - .set_enable_proc_attr_macros(self.config.expand_proc_attr_macros()); + if self.analysis_host.raw_database().enable_proc_attr_macros() + != self.config.expand_proc_attr_macros() + { + self.analysis_host + .raw_database_mut() + .set_enable_proc_attr_macros(self.config.expand_proc_attr_macros()); + } } pub(crate) fn current_status(&self) -> lsp_ext::ServerStatusParams { |
