Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support LSP diagnostic tags #9780

Merged
merged 1 commit into from
Mar 2, 2024
Merged

Support LSP diagnostic tags #9780

merged 1 commit into from
Mar 2, 2024

Conversation

the-mikedavis
Copy link
Member

@the-mikedavis the-mikedavis commented Mar 1, 2024

These are defined as DiagnosticTag in the spec. Tags are an optional part of a diagnostic that can give some extra metadata. Currently the spec only contains Unnecessary and Deprecated and it gives some hints on how to theme those keys. We can introduce some new theme keys for these tags and fall back to the diagnostic's severity highlight.

I mixed up the branches somehow but this is #9767 with a slight tweak to the theming of the new keys in the default theme.

For example a deprecated diagnostic from rust-analyzer:

deprecated-strikethrough

These are defined as [`DiagnosticTag`] in the spec. Tags are an optional
part of a diagnostic that can give some extra metadata. Currently the
spec only contains `Unnecessary` and `Deprecated` and it gives some
hints on how to theme those keys. We can introduce some new theme keys
for these tags and fall back to the diagnostic's severity highlight.

[`DiagnosticTag`]: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnosticTag
@the-mikedavis the-mikedavis added E-easy Call for participation: Experience needed to fix: Easy / not much A-language-server Area: Language server client S-waiting-on-review Status: Awaiting review from a maintainer. labels Mar 1, 2024
@archseer archseer merged commit 5ca6a44 into master Mar 2, 2024
6 checks passed
@archseer archseer deleted the lsp-diagnostic-tags branch March 2, 2024 04:37
Desdaemon pushed a commit to Desdaemon/helix that referenced this pull request Mar 4, 2024
postsolar pushed a commit to postsolar/helix that referenced this pull request Apr 4, 2024
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 2, 2024
Vulpesx pushed a commit to Vulpesx/helix that referenced this pull request Jun 7, 2024
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-server Area: Language server client E-easy Call for participation: Experience needed to fix: Easy / not much S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants