diff --git a/assets/settings/default.json b/assets/settings/default.json index d0cd8d2276f4173489a6b8c3e1040e00f7330658..2b899283841b8b580f6af009d8d1ec9c1ca24940 100644 --- a/assets/settings/default.json +++ b/assets/settings/default.json @@ -1,8 +1,5 @@ { "$schema": "zed://schemas/settings", - /// The displayed name of this project. If not set or null, the root directory name - /// will be displayed. - "project_name": null, // The name of the Zed theme to use for the UI. // // `mode` is one of: diff --git a/crates/settings/src/vscode_import.rs b/crates/settings/src/vscode_import.rs index d2e4681db7584f46f6d4131ea08607f4abb7ac96..2fdd8e645803ba06354082bd01c9b0c6916f33fa 100644 --- a/crates/settings/src/vscode_import.rs +++ b/crates/settings/src/vscode_import.rs @@ -1036,7 +1036,6 @@ impl VsCodeSettings { fn worktree_settings_content(&self) -> WorktreeSettingsContent { WorktreeSettingsContent { - project_name: None, prevent_sharing_in_public_channels: false, file_scan_exclusions: self .read_value("files.watcherExclude") diff --git a/crates/settings_content/src/project.rs b/crates/settings_content/src/project.rs index 6e8b296ef21efa838833038582de82b3ebc4f28b..2a33373a8534c612dfbfc13e257d54970e719145 100644 --- a/crates/settings_content/src/project.rs +++ b/crates/settings_content/src/project.rs @@ -90,12 +90,6 @@ pub struct ProjectSettingsContent { #[with_fallible_options] #[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, JsonSchema, MergeFrom)] pub struct WorktreeSettingsContent { - /// The displayed name of this project. If not set or null, the root directory name - /// will be displayed. - /// - /// Default: null - pub project_name: Option, - /// Whether to prevent this project from being shared in public channels. /// /// Default: false diff --git a/crates/settings_ui/src/page_data.rs b/crates/settings_ui/src/page_data.rs index 30d60febe5adf71efef30248ee8404832451fc36..52557256f1431a5f897c400ea339b73e9af319c8 100644 --- a/crates/settings_ui/src/page_data.rs +++ b/crates/settings_ui/src/page_data.rs @@ -108,30 +108,6 @@ fn general_page(cx: &App) -> SettingsPage { fn general_settings_section(_cx: &App) -> Vec { vec![ SettingsPageItem::SectionHeader("General Settings"), - SettingsPageItem::SettingItem(SettingItem { - files: PROJECT, - title: "Project Name", - description: "The displayed name of this project. If left empty, the root directory name will be displayed.", - field: Box::new(SettingField { - json_path: Some("project_name"), - pick: |settings_content| { - settings_content - .project - .worktree - .project_name - .as_ref() - .or(DEFAULT_EMPTY_STRING) - }, - write: |settings_content, value| { - settings_content.project.worktree.project_name = - value.filter(|name| !name.is_empty()); - }, - }), - metadata: Some(Box::new(SettingsFieldMetadata { - placeholder: Some("Project Name"), - ..Default::default() - })), - }), SettingsPageItem::SettingItem(SettingItem { title: "When Closing With No Tabs", description: "What to do when using the 'close active item' action with no tabs.", diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index e6312e695476cf081f65fe238ec10386fb93e443..995023cdd298897ec636c0add7afdfeea7631677 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -5812,18 +5812,8 @@ impl Workspace { let mut title = String::new(); for (i, worktree) in project.visible_worktrees(cx).enumerate() { - let name = { - let settings_location = SettingsLocation { - worktree_id: worktree.read(cx).id(), - path: RelPath::empty(), - }; + let name = worktree.read(cx).root_name_str(); - let settings = WorktreeSettings::get(Some(settings_location), cx); - match &settings.project_name { - Some(name) => name.as_str(), - None => worktree.read(cx).root_name_str(), - } - }; if i > 0 { title.push_str(", "); } diff --git a/crates/worktree/src/worktree_settings.rs b/crates/worktree/src/worktree_settings.rs index 79b482482942b4322fef869e04b4ea18943a7f8a..90fe5ba724b286ebcd6d473a9678f3c8236cf07b 100644 --- a/crates/worktree/src/worktree_settings.rs +++ b/crates/worktree/src/worktree_settings.rs @@ -10,7 +10,6 @@ use util::{ #[derive(Clone, PartialEq, Eq, RegisterSetting)] pub struct WorktreeSettings { - pub project_name: Option, /// Whether to prevent this project from being shared in public channels. pub prevent_sharing_in_public_channels: bool, pub file_scan_exclusions: PathMatcher, @@ -76,7 +75,6 @@ impl Settings for WorktreeSettings { .collect(); Self { - project_name: worktree.project_name, prevent_sharing_in_public_channels: worktree.prevent_sharing_in_public_channels, file_scan_exclusions: path_matchers(file_scan_exclusions, "file_scan_exclusions") .log_err() diff --git a/crates/worktree/tests/integration/worktree_settings.rs b/crates/worktree/tests/integration/worktree_settings.rs index 213d888e9f99980d28be62717ff3d2885ebdfe57..0a47766f35f4809d1ef28c7397b489670264d460 100644 --- a/crates/worktree/tests/integration/worktree_settings.rs +++ b/crates/worktree/tests/integration/worktree_settings.rs @@ -7,7 +7,6 @@ use worktree::*; fn make_settings_with_read_only(patterns: &[&str]) -> WorktreeSettings { WorktreeSettings { - project_name: None, prevent_sharing_in_public_channels: false, file_scan_exclusions: PathMatcher::default(), file_scan_inclusions: PathMatcher::default(),