Support setting custom background color for syntax highlighting (#12400)

Release Notes:

- Added support for `background_color` in `syntax` map in `theme.json`.

This adds support for setting a `background_color` for styles inside the
`syntax` map for themes defined in `theme.json`. The field is optional
so there should be no backwards compatibility issues.

It is worth noting that the current behaviour for selecting text is that
the background colours will mix/blend (I'm not sure the correct term
here). Changing this behaviour, or making it configurable, looks to be a
far more complex issue and I'm not sure I know how to do it.
This commit is contained in:
Danielle Maywood 2024-05-29 00:25:09 +01:00 committed by GitHub
parent fcb4abf18b
commit 7969a10643
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 1 deletions

View file

@ -241,6 +241,7 @@ impl VsCodeThemeConverter {
let highlight_style = HighlightStyleContent {
color: token_color.settings.foreground.clone(),
background_color: token_color.settings.background.clone(),
font_style: token_color
.settings
.font_style