From 65234e8828defc0a56cb1d5e20793b5163b5330d Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Fri, 1 May 2020 18:59:19 -0400 Subject: 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 +-- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'crates') 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 { #[derive(Debug, Clone)] pub struct NotificationsConfig { - pub workspace_loaded: bool, pub cargo_toml_not_found: bool, } @@ -83,10 +82,7 @@ impl Default for Config { 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 @@ impl Config { 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 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( }); } - 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 -- cgit v1.2.3