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,12 +1,15 @@
|
||||
mod base_keymap_setting;
|
||||
mod editable_setting_control;
|
||||
mod keymap_file;
|
||||
mod settings_content;
|
||||
mod settings_file;
|
||||
mod settings_json;
|
||||
mod settings_store;
|
||||
mod settings_ui_core;
|
||||
mod vscode_import;
|
||||
|
||||
pub use settings_content::*;
|
||||
|
||||
use gpui::{App, Global};
|
||||
use rust_embed::RustEmbed;
|
||||
use std::{borrow::Cow, fmt, str};
|
||||
@@ -21,8 +24,7 @@ pub use keymap_file::{
|
||||
pub use settings_file::*;
|
||||
pub use settings_json::*;
|
||||
pub use settings_store::{
|
||||
InvalidSettingsError, LocalSettingsKind, Settings, SettingsKey, SettingsLocation,
|
||||
SettingsSources, SettingsStore,
|
||||
InvalidSettingsError, LocalSettingsKind, Settings, SettingsKey, SettingsLocation, SettingsStore,
|
||||
};
|
||||
pub use settings_ui_core::*;
|
||||
// Re-export the derive macro
|
||||
@@ -75,10 +77,7 @@ impl fmt::Display for WorktreeId {
|
||||
pub struct SettingsAssets;
|
||||
|
||||
pub fn init(cx: &mut App) {
|
||||
let mut settings = SettingsStore::new(cx);
|
||||
settings
|
||||
.set_default_settings(&default_settings(), cx)
|
||||
.unwrap();
|
||||
let settings = SettingsStore::new(cx, &default_settings());
|
||||
cx.set_global(settings);
|
||||
BaseKeymap::register(cx);
|
||||
SettingsStore::observe_active_settings_profile_name(cx).detach();
|
||||
|
||||
Reference in New Issue
Block a user