golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.21k stars 17.7k forks source link

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

Open findleyr opened 2 days ago

findleyr commented 2 days ago

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.