Editor tab bar settings (#7356)

This PR is another step to tabless editing (#6424, #4963). It adds
support for tab bar settings that allow the user to change its placement
or to hide completely.

Configuraton:

```json
"tab_bar": {
  "show": true
}
```

Placemnet options are "top", "bottom" and "no".

This PR intentionally doesn't affect tab bars of other panes (Terminal
for instance) to keep code changes small. I guess we'll do the rest in
separate PRs.

Release Notes:

- Added support for configuring the editor tab bar (part of #6424,
#4963).

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Andrew Lygin 2024-05-08 20:54:48 +03:00 committed by GitHub
parent 689e4aef2f
commit 0933426e63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 98 additions and 2 deletions

View file

@ -60,11 +60,16 @@ pub struct WorkspaceSettingsContent {
#[derive(Deserialize)]
pub struct TabBarSettings {
pub show: bool,
pub show_nav_history_buttons: bool,
}
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema)]
pub struct TabBarSettingsContent {
/// Whether or not to show the tab bar in the editor.
///
/// Default: top
pub show: Option<bool>,
/// Whether or not to show the navigation history buttons in the tab bar.
///
/// Default: true