From 65234e8828defc0a56cb1d5e20793b5163b5330d Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Fri, 1 May 2020 18:59:19 -0400 Subject: [PATCH] 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. --- crates/rust-analyzer/src/config.rs | 7 +------ crates/rust-analyzer/src/main_loop.rs | 3 +-- editors/code/package.json | 5 ----- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 177da94cc9b..15b7c691219 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -49,7 +49,6 @@ pub enum FilesWatcher { #[derive(Debug, Clone)] pub struct NotificationsConfig { - pub workspace_loaded: bool, pub cargo_toml_not_found: bool, } @@ -83,10 +82,7 @@ fn default() -> Self { lru_capacity: None, proc_macro_srv: None, files: FilesConfig { watcher: FilesWatcher::Notify, exclude: Vec::new() }, - notifications: NotificationsConfig { - workspace_loaded: true, - cargo_toml_not_found: true, - }, + notifications: NotificationsConfig { cargo_toml_not_found: true }, cargo: CargoConfig::default(), rustfmt: RustfmtConfig::Rustfmt { extra_args: Vec::new() }, @@ -129,7 +125,6 @@ pub fn update(&mut self, value: &serde_json::Value) { Some("client") => FilesWatcher::Client, Some("notify") | _ => FilesWatcher::Notify }; - set(value, "/notifications/workspaceLoaded", &mut self.notifications.workspace_loaded); set(value, "/notifications/cargoTomlNotFound", &mut self.notifications.cargo_toml_not_found); 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 0a0e616c9cb..3bc2e0a4624 100644 --- a/crates/rust-analyzer/src/main_loop.rs +++ b/crates/rust-analyzer/src/main_loop.rs @@ -415,8 +415,7 @@ fn loop_turn( }); } - let show_progress = - !loop_state.workspace_loaded && world_state.config.notifications.workspace_loaded; + let show_progress = !loop_state.workspace_loaded; if !loop_state.workspace_loaded && loop_state.roots_scanned == loop_state.roots_total diff --git a/editors/code/package.json b/editors/code/package.json index d30673791f7..7ef727b9d09 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -205,11 +205,6 @@ "default": [], "description": "Paths to exclude from analysis." }, - "rust-analyzer.notifications.workspaceLoaded": { - "type": "boolean", - "default": true, - "markdownDescription": "Whether to show `workspace loaded` message." - }, "rust-analyzer.notifications.cargoTomlNotFound": { "type": "boolean", "default": true,