Builds on top of existing work from #2249, but here's a showcase:
https://github.com/zed-industries/zed/assets/53836821/4b346965-6654-496c-b379-75425d9b493f
TODO:
- [x] handle line wrapping
- [x] implement handling in multibuffer (crashes currently)
- [x] add configuration option
- [x] new theme properties? What colors to use?
- [x] Possibly support indents with different colors or background
colors
- [x] investigate edge cases (e.g. indent guides and folds continue on
empty lines even if the next indent is different)
- [x] add more tests (also test `find_active_indent_index`)
- [x] docs (will do in a follow up PR)
- [x] benchmark performance impact
Release Notes:
- Added indent guides
([#5373](https://github.com/zed-industries/zed/issues/5373))
---------
Co-authored-by: Nate Butler <1714999+iamnbutler@users.noreply.github.com>
Co-authored-by: Remco <djsmits12@gmail.com>
This PR updates the color of the label used for Git-aware items to use
the `ignored` color from the theme when the item is ignored by Git.
The built-in themes have had their `ignored` color updated to match
`text.disabled`, as the existing `ignored` color did not sufficiently
differentiate from non-ignored items.
Fixes#9976.
Release Notes:
- Updated items in the project panel to use the `ignored` color from the
theme when they are ignored by Git
([#9976](https://github.com/zed-industries/zed/issues/9976)).
I think bold is the least fitting font weight for inlay hints, which
should be subtle hints and not, well, bold.
If someone feels strongly about this, I can revert, but only if we add
the ability to change this per theme.
Until then: beautiful, thin, subtle inlay hints!
Release Notes:
- Improved styling of inlay hints by not making them bold in the editor.
![screenshot-2024-02-23-17 30
29@2x](https://github.com/zed-industries/zed/assets/1185253/89c2a162-76bb-45cd-8b45-2a5bdf8ca87b)
This small inconsistency was mentioned on the discord. This fixes it.
Release Notes:
- Themes: Renamed `scrollbar_thumb.background` to
`scrollbar.thumb.background` to be consistent with other style
properties.
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This PR populates the `search.match_background` colors in the bundled
themes, using the values from the Zed1 themes.
Release Notes:
- Added theme-specific `search.match_background` colors to built-in
themes.
This PR changes the theme loading to use the JSON themes bundled with
the binary rather then the Rust theme definitions.
### Performance
I profiled this using `cargo run --release` to see what the speed
differences would be now that we're deserializing JSON:
**Before:** `ThemeRegistry::load_user_themes` took 16.656666ms
**After:** `ThemeRegistry::load_user_themes` took 18.784875ms
It's slightly slower, but not by much. There is probably some work we
could do here to bring down the theme loading time in general.
Release Notes:
- N/A
This PR adds serialized versions of each of the themes that currently
ship with Zed.
In a future PR we'll be looking to make these the canonical
representations of the built-in themes.
Note that we're intentionally repurposing the `theme_importer` to do
this, so that crate is a bit rough-and-ready at the moment.
Release Notes:
- N/A
This PR removes the VS Code themes from the `assets/` directory, as
we're not currently using them (and it's unlikely we will in their
current state).
Release Notes:
- N/A
This PR fixes the names of the Rosé Pine themes.
We want to keep the Unicode "é" in the theme name, both because this is
the actual name of the theme, and also to maintain parity with Zed1.
Release Notes:
- N/A
This PR adds support for adding a specific set of mappings from Zed
syntax tokens to VS Code scopes for a particular theme family.
We can use this as a fallback when we aren't otherwise able to rely on
the mappings in the theme importer, as sometimes it isn't possible to
make a specific enough matcher that works across all of the themes.
Release Notes:
- N/A
* Generate the themes on build
* In debug builds, watch the theme sources. When they change, re-generate
the themes and reload the current theme, removing the need for the
`theme_selector::Reload` command.
Co-authored-by: Keith Simmons <keith@zed.dev>