Previously, some of those properties such the font weight, style and color
would be mandatory: when the theme didn't specify them, Zed would use a default
value during deserialization. This meant that those default properties would
unconditionally override the base text style, causing a rendering bug when
combining syntax highlights with diagnostic styles.
This commit fixes that by making `HighlightStyle`s more additive: each property
can be set independently and only the properties that theme specifies get
overridden in the base text style.
This allows us to drop the context *after* we ran all futures to
completion and that's crucial otherwise we'll never drop entities
and/or flush effects.
We use chunks a lot to transform points and sync the various display maps,
and always querying tree-sitter or the LSP diagnostics in those cases is
unnecessarily expensive.
Change Chunks to contain highlight ids instead of actual highlight
styles. Retrieve the actual highlight style from the theme in the
editor element layer.
This is to set us up to perform syntax highlighting in other code
paths where the theme is not available.
When multiple saves occur, we can have multiple start events followed by multiple end events. We don't want to update our project diagnostics view until all pending progress is finished.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This allows us to respect the bias on anchors we use to create excerpt headers so that they always remain above any content inserted at the start of an excerpt.
Since these methods take buffer points instead of display points, this adjusts
the logic for retrieving the visible selections, so that they are initially returned
in terms of buffer points.
We added clipping of points against the buffer when excerpt headers were in the buffer, but now that they're just blocks, I think we can avoid the potential to panic in these methods by going back to not clipping.
Render primary message above the excerpt and supporting messages as block decorations with a `Below` disposition. This is still super rough.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>