aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Chin <[email protected]>2020-05-01 23:59:19 +0100
committerAndrew Chin <[email protected]>2020-05-02 02:04:41 +0100
commit65234e8828defc0a56cb1d5e20793b5163b5330d (patch)
tree07047d818f29038f8208ad05429ce8002b320a9b
parent3232fd5179f2e36dee69955ba8aae0463b142e67 (diff)
Remove `workspaceLoaded` setting
The `workspaceLoaded` notification setting was originally designed to control the display of a popup message that said: "workspace loaded, {} rust packages" This popup was removed and replaced by a much sleeker message in the VSCode status bar that provides a real-time status while loading: rust-analyzer: {}/{} packages This was done as part of #3587 The new status-bar indicator is unobtrusive and shouldn't need to be disabled. So this setting is removed.
-rw-r--r--crates/rust-analyzer/src/config.rs7
-rw-r--r--crates/rust-analyzer/src/main_loop.rs3
-rw-r--r--editors/code/package.json5
3 files changed, 2 insertions, 13 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 177da94cc..15b7c6912 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -49,7 +49,6 @@ pub enum FilesWatcher {
49 49
50#[derive(Debug, Clone)] 50#[derive(Debug, Clone)]
51pub struct NotificationsConfig { 51pub struct NotificationsConfig {
52 pub workspace_loaded: bool,
53 pub cargo_toml_not_found: bool, 52 pub cargo_toml_not_found: bool,
54} 53}
55 54
@@ -83,10 +82,7 @@ impl Default for Config {
83 lru_capacity: None, 82 lru_capacity: None,
84 proc_macro_srv: None, 83 proc_macro_srv: None,
85 files: FilesConfig { watcher: FilesWatcher::Notify, exclude: Vec::new() }, 84 files: FilesConfig { watcher: FilesWatcher::Notify, exclude: Vec::new() },
86 notifications: NotificationsConfig { 85 notifications: NotificationsConfig { cargo_toml_not_found: true },
87 workspace_loaded: true,
88 cargo_toml_not_found: true,
89 },
90 86
91 cargo: CargoConfig::default(), 87 cargo: CargoConfig::default(),
92 rustfmt: RustfmtConfig::Rustfmt { extra_args: Vec::new() }, 88 rustfmt: RustfmtConfig::Rustfmt { extra_args: Vec::new() },
@@ -129,7 +125,6 @@ impl Config {
129 Some("client") => FilesWatcher::Client, 125 Some("client") => FilesWatcher::Client,
130 Some("notify") | _ => FilesWatcher::Notify 126 Some("notify") | _ => FilesWatcher::Notify
131 }; 127 };
132 set(value, "/notifications/workspaceLoaded", &mut self.notifications.workspace_loaded);
133 set(value, "/notifications/cargoTomlNotFound", &mut self.notifications.cargo_toml_not_found); 128 set(value, "/notifications/cargoTomlNotFound", &mut self.notifications.cargo_toml_not_found);
134 129
135 set(value, "/cargo/noDefaultFeatures", &mut self.cargo.no_default_features); 130 set(value, "/cargo/noDefaultFeatures", &mut self.cargo.no_default_features);
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index 0a0e616c9..3bc2e0a46 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -415,8 +415,7 @@ fn loop_turn(
415 }); 415 });
416 } 416 }
417 417
418 let show_progress = 418 let show_progress = !loop_state.workspace_loaded;
419 !loop_state.workspace_loaded && world_state.config.notifications.workspace_loaded;
420 419
421 if !loop_state.workspace_loaded 420 if !loop_state.workspace_loaded
422 && loop_state.roots_scanned == loop_state.roots_total 421 && loop_state.roots_scanned == loop_state.roots_total
diff --git a/editors/code/package.json b/editors/code/package.json
index d30673791..7ef727b9d 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -205,11 +205,6 @@
205 "default": [], 205 "default": [],
206 "description": "Paths to exclude from analysis." 206 "description": "Paths to exclude from analysis."
207 }, 207 },
208 "rust-analyzer.notifications.workspaceLoaded": {
209 "type": "boolean",
210 "default": true,
211 "markdownDescription": "Whether to show `workspace loaded` message."
212 },
213 "rust-analyzer.notifications.cargoTomlNotFound": { 208 "rust-analyzer.notifications.cargoTomlNotFound": {
214 "type": "boolean", 209 "type": "boolean",
215 "default": true, 210 "default": true,