Skip to content

x/tools/gopls: render package documentation when hovering over imported package name identifiers #71248

Open
@GSmithApps

Description

@GSmithApps

Is your feature request related to a problem? Please describe.
Package-level description isn't rendering

Describe the solution you'd like
I'd like the package-level description to render when hovering over an imported package, as shown in the screenshots below. ChatGPT suggests that if a package is spread across multiple files, Go uses first (alphabetically) nonempty comment, but I'm not totally sure. I don't know if VSCode is just getting confused.

Describe alternatives you've considered
One option is to ignore it. Another is to use GoLand. Another is to just always have the docs up

Additional context

GoLand

I know the docs are there. They're in doc.go, and they're rendering in Godoc, and they're showing in GoLand

https://pkg.go.dev/go.temporal.io/[email protected]/workflow#Go

Screenshot 2025-01-10 at 4 01 35 PM docs-are-in-doc-dot-go Using-GoLand

VSCode

Using-vscode

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.goplsIssues related to the Go language server, gopls.help wanted

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions