-
Notifications
You must be signed in to change notification settings - Fork 5
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
Improve diagnostics #424
Comments
Wouldn't scalameta/metals#7294 achieve what you want? |
LGTM. Not sure if there are any issues with version mismatches. i.e. newer version of Bloop supplies a field in Diagnostic that an older version of VSCode doesn't have. But I imagine the clients just ignore additional fields? |
That's the usual behaviour, I haven't seen issues with more fields only ever with wrong ones. |
Is your feature request related to a problem? Please describe.
BSP and LSP have 3 diagnostic fields that are (almost) ignored by Metals:
tags
,codeDescription
andrelatedInformation
Describe the solution you'd like
Could Metals pass on these 3 fields from BSP to LSP?
BSP spec for Diagnostic is here
LSP spec for Diagnostic is here
Metals code is here
Metals could pass on the fields and still enhance the
tags
with the current deprecation check based oncode
if the BSP server isn't passingtags
back.There are support flags sent by the LSP client...
capabilities#textDocument#publishDiagnostics#codeDescriptionSupport
capabilities#textDocument#publishDiagnostics#tagSupport
capabilities#textDocument#publishDiagnostics#relatedInformation
I'm not sure if these flags should be checked before populating the info or whether a client will just ignore any additional information. Documentation here
Describe alternatives you've considered
The diagnostics are pretty good as is but this would be icing on the cake.
Additional context
This was also requested in #309 but only for the
deprecated
tag. These additional fields would be helpful as well although I've not had to use therelatedInformation
field.Search terms
Diagnostics deprecated unused codedescription relatedinformation
The text was updated successfully, but these errors were encountered: