Add ability to hide status bar (#39430)
This pull request adds the ability to configure the setting to hide or show the status bar, as described in discussion: https://github.com/zed-industries/zed/discussions/38591 The original [PR #38974](https://github.com/zed-industries/zed/pull/38974#issuecomment-3362020879) was merged but reverted due to hidden conflicts. As per @ConradIrwin 's [request](https://github.com/zed-industries/zed/pull/38974#issuecomment-3362020879), I am recreating the PR on top of updated main branch. Release Notes: - Added an experimental setting `"status_bar": { "experimental.show": false}` to hide the status bars. --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
co-authored by
Conrad Irwin
parent
55e68553a4
commit
d9c7f44b0b
@@ -60,6 +60,7 @@ pub struct SettingsContent {
|
||||
|
||||
pub tabs: Option<ItemSettingsContent>,
|
||||
pub tab_bar: Option<TabBarSettingsContent>,
|
||||
pub status_bar: Option<StatusBarSettingsContent>,
|
||||
|
||||
pub preview_tabs: Option<PreviewTabsSettingsContent>,
|
||||
|
||||
|
||||
@@ -54,8 +54,6 @@ pub struct EditorSettingsContent {
|
||||
///
|
||||
/// Default: 300
|
||||
pub hover_popover_delay: Option<u64>,
|
||||
/// Status bar related settings
|
||||
pub status_bar: Option<StatusBarContent>,
|
||||
/// Toolbar related settings
|
||||
pub toolbar: Option<ToolbarContent>,
|
||||
/// Scrollbar related settings
|
||||
@@ -193,20 +191,6 @@ pub struct EditorSettingsContent {
|
||||
pub lsp_document_colors: Option<DocumentColorsRenderMode>,
|
||||
}
|
||||
|
||||
// Status bar related settings
|
||||
#[skip_serializing_none]
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonSchema, MergeFrom, PartialEq, Eq)]
|
||||
pub struct StatusBarContent {
|
||||
/// Whether to display the active language button in the status bar.
|
||||
///
|
||||
/// Default: true
|
||||
pub active_language_button: Option<bool>,
|
||||
/// Whether to show the cursor position button in the status bar.
|
||||
///
|
||||
/// Default: true
|
||||
pub cursor_position_button: Option<bool>,
|
||||
}
|
||||
|
||||
// Toolbar related settings
|
||||
#[skip_serializing_none]
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonSchema, MergeFrom, PartialEq, Eq)]
|
||||
|
||||
@@ -361,6 +361,24 @@ pub struct TabBarSettingsContent {
|
||||
pub show_tab_bar_buttons: Option<bool>,
|
||||
}
|
||||
|
||||
#[skip_serializing_none]
|
||||
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, MergeFrom, Debug, PartialEq, Eq)]
|
||||
pub struct StatusBarSettingsContent {
|
||||
/// Whether to show the status bar.
|
||||
///
|
||||
/// Default: true
|
||||
#[serde(rename = "experimental.show", default)]
|
||||
pub show: Option<bool>,
|
||||
/// Whether to display the active language button in the status bar.
|
||||
///
|
||||
/// Default: true
|
||||
pub active_language_button: Option<bool>,
|
||||
/// Whether to show the cursor position button in the status bar.
|
||||
///
|
||||
/// Default: true
|
||||
pub cursor_position_button: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema, MergeFrom)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum AutosaveSetting {
|
||||
|
||||
Reference in New Issue
Block a user