Skip to content

Conversation

@jakebailey
Copy link
Member

@jakebailey jakebailey commented Nov 3, 2025

These were missing; noticed while working on #1998.

Better viewed without whitespace: https://github.com/microsoft/typescript-go/pull/2009/files?w=1

Copilot AI review requested due to automatic review settings November 3, 2025 19:43
@jakebailey jakebailey marked this pull request as draft November 3, 2025 19:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds documentation support to signature help responses in the language server. When a function or method has JSDoc comments, those comments are now included in the signature help information displayed to users.

Key Changes

  • The language server now extracts and formats JSDoc comments from function/method declarations
  • Documentation is provided in the client's preferred format (markdown or plaintext)
  • Client capabilities are checked to determine the appropriate documentation format

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

File Description
internal/lsp/server.go Added getSignatureHelpDocumentationFormat function to extract client's preferred documentation format from initialization params and pass it to signature help provider
internal/ls/signaturehelp.go Modified signature help generation to extract JSDoc comments from declarations and include them in the response with proper formatting
internal/fourslash/fourslash.go Updated default test capabilities to support markdown documentation in signature help
testdata/baselines/reference/fourslash/signatureHelp/*.baseline Updated test baselines showing documentation now appears in signature help responses

jakebailey and others added 2 commits November 3, 2025 11:59
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jakebailey jakebailey marked this pull request as ready for review November 3, 2025 20:01
Comment on lines +304 to +309
ParameterInformation: &lsproto.ClientSignatureParameterInformationOptions{
LabelOffsetSupport: ptrTrue,
},
ActiveParameterSupport: ptrTrue,
},
ContextSupport: ptrTrue,
Copy link
Member Author

@jakebailey jakebailey Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not actually checking these correctly currently (different PR).

@jakebailey jakebailey added this pull request to the merge queue Nov 3, 2025
Merged via the queue into main with commit 2ba0e47 Nov 3, 2025
22 checks passed
@jakebailey jakebailey deleted the jabaile/sig-help-docs branch November 3, 2025 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants