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

DiagnosticUnnecessary (and possibly other Diagnostic<name>(s)) Are not Being Handled By Onedark #225

Open
EightBitBoot opened this issue Aug 4, 2024 · 0 comments

Comments

@EightBitBoot
Copy link

lua-language-server uses DiagnosticUnnecessary for unused local variables and empty code blocks. This is great for development, however - by default - DiagnosticUnnecessary links to Comment: graying out entire function definitions / control blocks (including the start and end lines) and making those regions extremely hard to read.
Screenshot 2024-08-04 at 3 53 08 PM

The lua-language-server documentation for the unused diagnostic states that the text becomes slightly transparent (I'm assuming this is the effect produced by vscode) which would be a cool idea, if possible (perhaps by using a slightly darkened palette of the same colors).

The quick and dirty workaround I found (here) is to run

:highlight! link DiagnosticUnnecessary WarningText

but that only disables the comment formatting.
Screenshot 2024-08-04 at 3 53 37 PM

Linking DiagnosticUnnecessary to DiagnosticUnderlineWarn produces ugly underlines on leading whitespace (space indented)
Screenshot 2024-08-04 at 3 52 41 PM

and linking to DiagnosticWarn turns the contents of the function yellow.
Screenshot 2024-08-04 at 3 54 11 PM

I'm not sure the best approach to fix this (while also sticking to onedark conventions) so I'm posting this as an issue. If whoever is reading this comes up with an appropriate solution, I would be more than happy to make the changes and a pull request.

P.S. DiagnosticUnnecessary and DiagnosticDeprecated were previously supported but undocumented neovim/neovim#22931


Versioning Info

Component Version
neovim v0.10.1
lazy.nvim v11.14.1
onedark branch: master; commit: fae34f7
lua-language-server lua-language-server --version reports <Unknown>, however my package manager reports 3.10.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant