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

@ -315,6 +315,82 @@ List of `string` values
`boolean` values
## Editor Tab Bar
- Description: Settings related to the editor's tab bar.
- Settings: `tab_bar`
- Default:
```json
"tab_bar": {
"show": true,
"show_nav_history_buttons": true
}
```
### Show
- Description: Whether or not to show the tab bar in the editor.
- Setting: `show`
- Default: `true`
**Options**
`boolean` values
### Navigation History Buttons
- Description: Whether or not to show the navigation history buttons.
- Setting: `show_nav_history_buttons`
- Default: `true`
**Options**
`boolean` values
## Editor Tabs
- Description: Configuration for the editor tabs.
- Setting: `tabs`
- Default:
```json
"tabs": {
"close_position": "right",
"git_status": false
},
```
### Close Position
- Description: Where to display close button within a tab.
- Setting: `close_position`
- Default: `right`
**Options**
1. Display the close button on the right:
```json
{
"close_position": "right"
}
```
2. Display the close button on the left:
```json
{
"close_position": "left"
}
```
### Git Status
- Description: Whether or not to show Git file status in tab.
- Setting: `git_status`
- Default: `false`
## Editor Toolbar
- Description: Whether or not to show various elements in the editor toolbar.