Adding signature help tooltip coloring support for VS#3821
Merged
Conversation
…o navyasingh/VSSupport
946ffcb to
40cb407
Compare
jakebailey
requested changes
May 13, 2026
jakebailey
reviewed
May 14, 2026
navya9singh
commented
May 14, 2026
Comment on lines
+45
to
+51
| "parameters": [], | ||
| "_vs_colorizedLabel": { | ||
| "Runs": [ | ||
| { | ||
| "ClassificationTypeName": "method name", | ||
| "Text": "foo" | ||
| }, |
Member
There was a problem hiding this comment.
Do we just need to enable the VS cap in fourslash?
Member
Author
There was a problem hiding this comment.
Yes, if we enable the capability in fourslash then these responses will include the _vs_colorizedLabel. Should I do that?
Member
There was a problem hiding this comment.
Yes, I assume we want to make sure it's working, right?
Member
Author
There was a problem hiding this comment.
Sure, I'll add it. I've tried it with VS and it works there and fixes the coloring issue.
Member
|
I think we should try to test this, but otherwise LGTM |
jakebailey
approved these changes
May 15, 2026
…o navyasingh/VSSupport
jakebailey
reviewed
May 15, 2026
| TestAutoImportTypeImport4 | ||
| TestAutoImportTypeOnlyPreferred3 | ||
| TestAutoImportVerbatimTypeOnly1 | ||
| TestCalledUnionsOfDissimilarTyeshaveGoodDisplay |
Member
There was a problem hiding this comment.
where did TestQualifyModuleTypeNames go?
Member
Author
There was a problem hiding this comment.
I'm running these tests again to check
jakebailey
approved these changes
May 15, 2026
jakebailey
approved these changes
May 15, 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.
How Strada does it
SymbolDisplayPartKindvalues (TypeScript's own enum)ClassificationTypeNamesviaGetClassificationName()ClassifiedTextElementand attaches it asColorizedLabelonSignatureInformationWhy Corsa needs a different approach
ClassifiedTextElementNew
displayPartsWriterWriteKeyword,WriteSymbol, etc. all just append plain textdisplayPartsWriterimplementsEmitTextWriteras an external writer passed toprinter.Write(), intercepting classified write calls and recording Roslyn classification names alongside textclassificationForSymbol()collapses Strada's 2-step translation (SymbolFlags→SymbolDisplayPartKind→ Roslyn name) into one step, verified against bothdisplayPartKind()andGetClassificationName()Changes
Modified:
internal/ls/signaturehelp.go- builds_vs_colorizedLabelwith classified runs per signatureModified:
internal/lsp/lsproto/_generate/generate.mts— addedClassifiedTextRun,ClassifiedTextElementtypes; patchedSignatureInformation23 baseline files updated with new
_vs_colorizedLabeldatadisplayPartsWriteris reusable for hover, FAR, completions — any feature needing VS colorized outputFixes Bug 2800005