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
+9 -6
View File
@@ -989,11 +989,10 @@ impl Vim {
mod test {
use gpui::{KeyBinding, TestAppContext, UpdateGlobal};
use indoc::indoc;
use language::language_settings::AllLanguageSettings;
use settings::SettingsStore;
use crate::{
VimSettings, motion,
motion,
state::Mode::{self},
test::{NeovimBackedTestContext, VimTestContext},
};
@@ -1724,8 +1723,8 @@ mod test {
async fn test_f_and_t_smartcase(cx: &mut gpui::TestAppContext) {
let mut cx = VimTestContext::new(cx, true).await;
cx.update_global(|store: &mut SettingsStore, cx| {
store.update_user_settings::<VimSettings>(cx, |s| {
s.use_smartcase_find = Some(true);
store.update_user_settings(cx, |s| {
s.vim.get_or_insert_default().use_smartcase_find = Some(true);
});
});
@@ -1891,8 +1890,12 @@ mod test {
cx.update(|_, cx| {
SettingsStore::update_global(cx, |settings, cx| {
settings.update_user_settings::<AllLanguageSettings>(cx, |settings| {
settings.defaults.preferred_line_length = Some(5);
settings.update_user_settings(cx, |settings| {
settings
.project
.all_languages
.defaults
.preferred_line_length = Some(5);
});
})
});