lsproto: separate VS diagnostic tag constant from CodeActionKind block#3990
Draft
Copilot wants to merge 3 commits into
Draft
lsproto: separate VS diagnostic tag constant from CodeActionKind block#3990Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
The LSP spec says clients are "allowed to render diagnostics [tagged Unnecessary] faded out instead of having an error squiggle." Visual Studio's LSP client, however, only renders the faded "unused" appearance when a diagnostic carries both DiagnosticTag.Unnecessary AND the VS-internal VSDiagnosticTags.HiddenInEditor tag; with just Unnecessary the diagnostic shows as a normal squiggle. When the client advertises _vs_supportsVisualStudioExtensions, also emit HiddenInEditor (int32.MaxValue - 6 = 2147483641) so unused variables and similar diagnostics render faded in Visual Studio. Non-VS clients continue to receive only the standard LSP tags. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: joj <2939999+joj@users.noreply.github.com>
Co-authored-by: joj <2939999+joj@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix code as per review comment for proper category
lsproto: separate VS diagnostic tag constant from CodeActionKind block
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This addresses review feedback on PR #3989 to keep protocol constants categorized by domain.
VSDiagnosticTagHiddenInEditorwas previously grouped withCodeActionKindconstants and is now moved to a dedicated const block.What changed
internal/lsp/lsproto/lsp.go.CodeActionKindSourceRemoveUnusedImportsandCodeActionKindSourceSortImportsin theCodeActionKindblock.VSDiagnosticTagHiddenInEditorinto its ownDiagnosticTag-focused const block (no value or behavior change).Why this matters
Illustrative diff