Settings refactor (#38367)

Co-Authored-By: Ben K <ben@zed.dev>
Co-Authored-By: Anthony <anthony@zed.dev>
Co-Authored-By: Mikayla <mikayla@zed.dev>

Release Notes:

- settings: Major internal changes to settings. The primary user-facing
effect is that some settings which did not make sense in project
settings files are no-longer read from there. (For example the inline
blame settings)

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Anthony <anthony@zed.dev>
This commit is contained in:
Conrad Irwin
2025-09-18 16:47:23 +00:00
committed by GitHub
co-authored by Ben Kunkle Mikayla Maki Anthony
parent 0a9023bce0
commit fcdab160f9
219 changed files with 11697 additions and 11894 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
use crate::{Settings, settings_store::SettingsStore};
use crate::{settings_content::SettingsContent, settings_store::SettingsStore};
use collections::HashSet;
use fs::{Fs, PathEventKind};
use futures::{StreamExt, channel::mpsc};
@@ -126,10 +126,10 @@ pub fn watch_config_dir(
rx
}
pub fn update_settings_file<T: Settings>(
pub fn update_settings_file(
fs: Arc<dyn Fs>,
cx: &App,
update: impl 'static + Send + FnOnce(&mut T::FileContent, &App),
update: impl 'static + Send + FnOnce(&mut SettingsContent, &App),
) {
SettingsStore::global(cx).update_settings_file::<T>(fs, update);
SettingsStore::global(cx).update_settings_file(fs, update);
}