feat: distinct inline diagnostic theme keys #13318
Open
+8
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Adds more specific theme keys to target the inline diagnostic styles:
hint.diagnostic.inline
info.diagnostic.inline
warning.diagnostic.inline
error.diagnostic.inline
The diagnostic-specific keys are appended to the existing "severity" keys so that it is backwards compatible with all existing themes; they will automatically fallback to use the current styles. Suggestions for alternative theme keys are welcome.
Why
I'm loving the recent addition of the inline diagnostic feature, however, sometimes I have been finding the
error
messages quite distracting as my helix theme uses quite a lot of red. I'd like to be able to style these so that they are less intrusive and make it easier to read the actual code.Default
With modified
error
theme keyWhile one could simply style the
error
key in the theme, this has the downside of affecting other parts of the UI (such as the gutter icon and the diagnostic picker). For example, I'd like to dim the text of the inline diagnostic but not dim the gutter icon.With proposed changes
With the proposed changes, one can now apply distinct styles to just the inline diagnostics without affecting other parts of the UI and can read the code more easily (note, non-dimmed gutter icon):
TODO
If this change is deemed acceptable, I will update this PR to: