Automate settings registration (#42238)

Release Notes:

- N/A

---------

Co-authored-by: Nia <nia@zed.dev>
This commit is contained in:
Mikayla Maki
2025-11-07 22:27:14 +00:00
committed by GitHub
co-authored by Nia
parent 309947aa53
commit 5f8226457e
161 changed files with 196 additions and 599 deletions
+2 -2
View File
@@ -1,14 +1,14 @@
use std::path::Path;
use anyhow::Context as _;
use settings::Settings;
use settings::{RegisterSetting, Settings};
use util::{
ResultExt,
paths::{PathMatcher, PathStyle},
rel_path::RelPath,
};
#[derive(Clone, PartialEq, Eq)]
#[derive(Clone, PartialEq, Eq, RegisterSetting)]
pub struct WorktreeSettings {
pub project_name: Option<String>,
/// Whether to prevent this project from being shared in public channels.
+2 -6
View File
@@ -1,7 +1,4 @@
use crate::{
Entry, EntryKind, Event, PathChange, Worktree, WorktreeModelHandle,
worktree_settings::WorktreeSettings,
};
use crate::{Entry, EntryKind, Event, PathChange, Worktree, WorktreeModelHandle};
use anyhow::Result;
use fs::{FakeFs, Fs, RealFs, RemoveOptions};
use git::GITIGNORE;
@@ -12,7 +9,7 @@ use pretty_assertions::assert_eq;
use rand::prelude::*;
use serde_json::json;
use settings::{Settings, SettingsStore};
use settings::SettingsStore;
use std::{
env,
fmt::Write,
@@ -2269,6 +2266,5 @@ fn init_test(cx: &mut gpui::TestAppContext) {
cx.update(|cx| {
let settings_store = SettingsStore::test(cx);
cx.set_global(settings_store);
WorktreeSettings::register(cx);
});
}