-
Notifications
You must be signed in to change notification settings - Fork 799
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
Clarification on DiagnosticTag
#1696
Comments
Actually LSP always state away from defining UI for the client (and it will). Clients may offer filter mechanism or other means to make them not show in the UI. Even VS Code doesn't hide them (at least in TypeScript) I will close the issue since I really don't want to enforce UI rendering in the LSP specification. |
Many thanks! |
|
Unfortunately not in this case. This is the diagnostic: {
"message": "\"_validator\" is not accessed",
"range": {
"end": {
"character": 30,
"line": 118
},
"start": {
"character": 20,
"line": 118
}
},
"severity": 4,
"source": "Pyright",
"tags": [ 1 ]
} |
So then VSCode doesn't treat "hint" diagnostics as problems. In case of TS it seems to be a "warning". |
That is correct: hints are not shown in the problems list in VS Code. |
Would it be possible to get further clarification on how clients are supposed to handle
DiagnosticTag
?According to the pyright maintainers (microsoft/pyright#1118 (comment)), diagnostics with the
Unnecessary
tag should not be treated as "real" diagnostics and should just be rendered faded and excluding from statuslines, sign column, inline text, etc. And, it should be considered a bug if any editor treats diagnostics with these tags as normal diagnostics. However, the spec does not say this explicitly.Can further clarification be provided on how clients should exactly implement diagnostics with these tags?
The text was updated successfully, but these errors were encountered: