microsoft / theme-converter-for-vs

CLI tool that allows you to convert your VS Code color theme to a VS 2022 color theme.
MIT License
497 stars 52 forks source link

Wrong highlighting for occurrence markers #103

Closed arcticicestudio closed 2 years ago

arcticicestudio commented 2 years ago

The background color that that is used to highlight any other occurrence of a syntax element does not use the theme specific style but a default (fallback?) color instead. Note that in order to test this in VS Code the editor.occurrencesHighlight setting must be enabled, otherwise semantic symbol occurrences won't be highlighted!

The "Nord" theme in VS with highlighted occurrences of the current syntax element at the cursor position.

The "Nord" theme in VS with a another highlighting which I am not sure what this is all about 😄 (function definition or class ownership?)

I've checked the Nord VS Code theme and found the following keys that are responsible for semantic occurrence highlighting:

The editor.findMatchHighlightBackground key is also related as it highlights all matches when searching for text in the editor.

Reproduction Steps

  1. Set Nord as active theme.
  2. Place the cursor in a syntax element that exists multiple times in the currently active editor.
  3. Validate that the highlighting color does not match the active theme, e.g. Nord.

Expected Behavior

I expected that the background color of other occurrences of the current syntax element at the cursor is a theme specific color insted of the default (fallback?) color.

Environment

Converter version: commit 34bbde361cb3511f7b6ae99dd2689c1825cca60e VS version: 17.0.0 Preview 3 Theme(s) used: Nord

(Possible) Release Impact

This issue is kind of a medium annoyance because it might distract users when moving around in code with the cursor and elements are highlighted with a color that definitely does not match the overall theme appeareance, but this is also not a blocker for a theme release and can be improved in a future version.

gracegtaylor commented 2 years ago

Thank you, @arcticicestudio for sharing this issue! It's helpful that you've identified the tokens. We can look into improving this issue in a later iteration of the tool!