You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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!linkDiagnosticUnnecessaryWarningText
but that only disables the comment formatting.
Linking DiagnosticUnnecessary to DiagnosticUnderlineWarn produces ugly underlines on leading whitespace (space indented)
and linking to DiagnosticWarn turns the contents of the function yellow.
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
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.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
but that only disables the comment formatting.
Linking
DiagnosticUnnecessary
toDiagnosticUnderlineWarn
produces ugly underlines on leading whitespace (space indented)and linking to
DiagnosticWarn
turns the contents of the function yellow.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
andDiagnosticDeprecated
were previously supported but undocumented neovim/neovim#22931Versioning Info
lua-language-server --version
reports<Unknown>
, however my package manager reports 3.10.1The text was updated successfully, but these errors were encountered: