Default theme to match system (#13621)

Release Notes:

- Default to a light theme during the day (#9627)
This commit is contained in:
Conrad Irwin 2024-06-27 22:06:22 -06:00 committed by GitHub
parent da03610555
commit c560a24e7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 22 deletions

View File

@ -1,19 +1,15 @@
{
// The name of the Zed theme to use for the UI.
//
// The theme can also be set to follow system preferences:
//
// "theme": {
// "mode": "system",
// "light": "One Light",
// "dark": "One Dark"
// }
//
// Where `mode` is one of:
// `mode` is one of:
// - "system": Use the theme that corresponds to the system's appearance
// - "light": Use the theme indicated by the "light" field
// - "dark": Use the theme indicated by the "dark" field
"theme": "One Dark",
"theme": {
"mode": "system",
"light": "One Light",
"dark": "One Dark",
},
// The name of a base set of key bindings to use.
// This setting can take four values, each named after another
// text editor:

View File

@ -8,5 +8,10 @@
// from the command palette or from `Zed` application menu.
{
"ui_font_size": 16,
"buffer_font_size": 16
"buffer_font_size": 16,
"theme": {
"mode": "system",
"light": "One Light",
"dark": "One Dark",
},
}

View File

@ -2,21 +2,19 @@
Zed comes with a number of built-in themes, with more themes available as extensions.
## Choosing a Theme
## Selecting a Theme
You can choose a theme in Zed a few ways:
You can see what these are installed and preview them from the Theme Selector. You can open the Theme Selector from the command palette with "theme selector: Toggle" (bound to `cmd-k cmd-t` on macOS and `ctrl-k ctrl-t` on Linux). Selecting a theme by moving up and down will change the theme in real time and hitting enter will save it to your settings file.
- by pressing `CMD + K` then `CMD + T`
- by typing `theme` in the command palette
- by editing your `settings.json` with a specific theme name:
## Installing more Themes
```json
{
"theme": "Ayu Mirage"
}
```
More themes are available from the Extensions page. You can open the Extensions page from the command palette with "zed: Extensions". Many popular themes have been ported to Zed, and if you're struggling to choose one, there's a third-party gallery hosted by https://zed-themes.com with visible previews for many of them.
You can also use different themes based on system preferences:
## Configuring a Theme
Your selected theme is stored in your settings file. You can open your settings file from the command palette with "zed: Open Settings" (bound to `cmd,` on macOS and `ctrl,` on Linux).
By default, Zed maintains two themes: one for light mode and one for dark mode. You can set the mode to `"dark"` or `"light"` to ignore the current system mode.
```json
{