Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: hover over unkeyed field should show field info #70450

Open
findleyr opened this issue Nov 19, 2024 · 2 comments
Open

x/tools/gopls: hover over unkeyed field should show field info #70450

findleyr opened this issue Nov 19, 2024 · 2 comments
Labels
FeatureRequest gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@findleyr
Copy link
Member

When hovering over the name of a field in a composite literal, we show info about that field.

But when hovering over a value in an unkeyed literal, we show nothing. If anything, field information would be more useful in an unkeyed literal! I recently bumped into this while working in the middle of a large table driven test.

This should be easy to add.

@findleyr findleyr added this to the gopls/backlog milestone Nov 19, 2024
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Nov 19, 2024
@adonovan
Copy link
Member

See https://go.dev/cl/631796 for a rough sketch. (I have not claimed this issue as my own.)

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/631796 mentions this issue: gopls/internal/golang: hover: show name/type of unkeyed field literal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants