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

@ -74,6 +74,7 @@ impl TerminalPanel {
pane.set_can_split(false, cx);
pane.set_can_navigate(false, cx);
pane.display_nav_history_buttons(None);
pane.set_should_display_tab_bar(|_| true);
pane.set_render_tab_bar_buttons(cx, move |pane, cx| {
h_flex()
.gap_2()