Add setting to hide active language button in the status bar (#33977)

Release Notes:

- Added settings status_bar.show_active_language_button to show/hide the
language button in the status bar.

The motivation for this is visual, I have had zero issues with its
functionality.

The language switcher can still be accessed by the command palette,
menu, or a keyboard shortcut.

------

This is my first Zed and first Rust PR, so criticism is very welcome. 

I know there has been discussion around how the status bar settings are
structured and named, and I am happy to change it to whatever is best. I
was also not sure what order to put it in in the settings default.json.
Feedback welcome.

Here is a picture of it in action:


![image](https://github.com/user-attachments/assets/c50131e2-71aa-4fab-8db0-8b2aae586e71)

---------

Co-authored-by: zumbalogy <3770982+zumbalogy@users.noreply.github.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
This commit is contained in:
zumbalogy 2025-08-07 22:04:30 -07:00 committed by GitHub
parent 0169bddb59
commit 2c7251e4f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 57 additions and 1 deletions

View file

@ -1275,6 +1275,18 @@ Each option controls displaying of a particular toolbar element. If all elements
`boolean` values
## Status Bar
- Description: Control various elements in the status bar. Note that some items in the status bar have their own settings set elsewhere.
- Setting: `status_bar`
- Default:
```json
"status_bar": {
"active_language_button": true,
},
```
## LSP
- Description: Configuration for language servers.

View file

@ -306,6 +306,17 @@ TBD: Centered layout related settings
}
```
### Status Bar
```json
"status_bar": {
// Show/hide a button that displays the active buffer's language.
// Clicking the button brings up the language selector.
// Defaults to true.
"active_language_button": true,
},
```
### Multibuffer
```json