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:
co-authored by
Ben Kunkle
Mikayla Maki
Anthony
parent
0a9023bce0
commit
fcdab160f9
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user