-
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
Add DiagnosticTag Type #500
Comments
This is more complicated for the LSP. Since the LSP is implemented for different clients simply adding this without thinking about how it will be implemented on other clients is not what we should do. We at least do need flag this as a client capability. BTW: this is why I was not a big fan of adding this that way. |
Another thing we need to consider is that Diagnostics flow in both ways. So even if a client doesn't handle a |
Clients that do not support |
I agree, but the problem I have in the LSP are objects that flow in both ways and the fact that the LSP tries to work in a backwards compatible way and for different client implementation. So in general that means:
This is all not an issue with the VS Code API since we have strict versioning which due to the loose Eco system of LSP we tried to avoid (btw debug does the same there with its protocol). So whenever we add |
Looks like this got added into |
Pending PR is #645 |
Yes, but only in a next version so far. |
Updated spec on dbaeumer/3.15 branch. |
VS Code recently added a
DiagnosticTag
type for attaching additional metadata to a diagnostic. These tags can be used by editors to control the presentation of diagnostics. See microsoft/vscode#51104 for a discussion of thisCurrently only one tag type has been added on the vs code side:
DiagnosticTag.Unnecessary
. This tag makes diagnostics for unused variables or unreachable bits of code. VS Code renders code marked withDiagnosticTag.Unnecessary
as faded out.DiagnosticTag
only adds metadata to a diagnostic and should not break clients that do not support it. WithDiagnosticTag.Unnecessary
for example, clients that do not support tags will still receive standard diagnostics for unused variables and can render them as regular errors / warnings / suggestionsThe text was updated successfully, but these errors were encountered: