Skip to content

Comments

[Repo Assist] fix: use Display instead of CanonicalTypeTextForSorting for signature help parameter types#1458

Merged
Krzysztof-Cieslak merged 2 commits intomainfrom
repo-assist/fix-issue-1029-parameter-type-display-a985c1d46e790ddc
Feb 23, 2026
Merged

[Repo Assist] fix: use Display instead of CanonicalTypeTextForSorting for signature help parameter types#1458
Krzysztof-Cieslak merged 2 commits intomainfrom
repo-assist/fix-issue-1029-parameter-type-display-a985c1d46e790ddc

Conversation

@github-actions
Copy link
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Closes #1029

Root Cause

In AdaptiveFSharpLspServer.fs, the TextDocumentSignatureHelp handler was using p.CanonicalTypeTextForSorting for the Documentation field of each ParameterInformation. This property is designed for sorting purposes and returns fully-qualified type names — e.g., Microsoft.FSharp.Core.char instead of char, or Microsoft.FSharp.Core.string instead of string.

Fix

Switch to p.Display (a TaggedText array), converted to a plain string via Array.map (fun t -> t.Text) |> String.concat "". The Display property uses the FCS display context for proper type name simplification, so it renders arr: char[] instead of arr: Microsoft.FSharp.Core.char[].

Trade-offs

  • Display includes both the parameter name and type (e.g., arr: char[]), whereas the old code showed only the type. This is actually more informative for the Documentation tooltip.
  • The Label field already carries just the parameter name, so the documentation being name: type is the natural complement.

Test Status

Build succeeded on net8.0 with 0 errors, 0 warnings.

Generated by Repo Assist

To install this workflow, run gh aw add githubnext/agentics/workflows/repo-assist.md@ee50a3b7d1d3eb4a8c409ac9409fd61c9a66b0f5. View source at https://github.com/githubnext/agentics/tree/ee50a3b7d1d3eb4a8c409ac9409fd61c9a66b0f5/workflows/repo-assist.md.

… help parameter types

Fixes #1029

The parameter Documentation field in SignatureInformation was using
p.CanonicalTypeTextForSorting, which returns fully-qualified type names
(e.g., 'Microsoft.FSharp.Core.char' instead of 'char'). Switch to
p.Display (TaggedText array converted to string) which uses the
FCS display context for proper type name simplification.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor Author

✅ Pull request created: #1458

@Krzysztof-Cieslak
Copy link
Member

/repo-assist add test case for this PR

…hould use simplified type names

Verifies that SignatureHelp parameter documentation does not show
fully-qualified type names (e.g., Microsoft.FSharp.Core.char) but
instead uses simplified names (e.g., char).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor Author

✅ Commit pushed: 92ba1dd

@github-actions
Copy link
Contributor Author

🤖 This is an automated response from Repo Assist.

I've added a regression test for issue #1029 to this PR. The test is in test/FsAutoComplete.Tests.Lsp/SignatureHelpTests.fs under issuesTests:

  • Creates a function f (arr: char[]) and triggers signature help at a call site
  • Asserts the parameter Documentation field does not contain Microsoft.FSharp.Core (the old fully-qualified form)
  • Asserts the documentation does contain char (the simplified form)

The test builds cleanly with 0 errors.

Generated by Repo Assist for issue #1458

To install this workflow, run gh aw add githubnext/agentics/workflows/repo-assist.md@828ac109efb43990f59475cbfce90ede5546586c. View source at https://github.com/githubnext/agentics/tree/828ac109efb43990f59475cbfce90ede5546586c/workflows/repo-assist.md.

@Krzysztof-Cieslak Krzysztof-Cieslak merged commit a4a02a1 into main Feb 23, 2026
26 checks passed
@Krzysztof-Cieslak Krzysztof-Cieslak deleted the repo-assist/fix-issue-1029-parameter-type-display-a985c1d46e790ddc branch February 23, 2026 14:52
github-actions bot added a commit that referenced this pull request Feb 24, 2026
Include all PRs merged since v0.83.0:
- #1441: Fix SourceLink go-to-def failure on .NET 10 on Linux
- #1452: Add FSharp.notifications.backgroundServiceProgress config option
- #1449: Fix semantic token multiline range uint32 underflow
- #1453: Fix spurious get/set rename in TextDocumentRename
- #1454: Fix missing { interpolated string completion trigger
- #1455: Fix non-ASCII path encoding in file URIs
- #1456: Disable inline values by default to restore pipeline hints
- #1457: Fix missing parens in function-type segments in AddExplicitTypeAnnotation
- #1458: Fix signature help parameter types showing fully-qualified names
- #1463: Fix seealso href/langword XML doc rendering

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Descriptions showing "Microsoft.FSharp.Core.char"

1 participant