Automate settings registration (#42238)
Release Notes: - N/A --------- Co-authored-by: Nia <nia@zed.dev>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user