Open deathaxe opened 4 years ago
I believe this is the intended behavior, due to the contrast issues you outlined.
Since we've added various mechanisms to the codebase in terms of ensuring contrast, it should be able to add the ability to accomplish this now. However, for backwards compatibility, it may require a different flag and extra details.
A flag
to control that behaviour might even be useful for plugins to decide about the use case.
Description
LSP supports symbol highlighting. In VSCode related symbols are highlighted by a lightend background color. They are underlined in ST, because there's no sane scope to use, which defines a slightly dimmed/lightend background color by default. That may easily become super distracting in situations of larger blocks being highlighted.
One example is highlighting media queries by LSP-css.
But even if there was one, syntax highlighting is removed by adding regions with backgrounds.
Steps to reproduce
Create the following debug.css file
Add the following rule for
markup.symbol
to your color scheme (override).Open debug.css in ST.
Run
view.add_regions(key='symbol', regions=[sublime.Region(21,63)], scope="markup.symbol")
Expected behavior
If background of a region is defined with opacity (e.g.: 10%) syntax highlighting should be maintained as it is for diff regions already. Maybe some checks and limitations with regards to contrast may be taken into account, then.
Actual behavior
Syntax highlighting is removed.
Environment