Skip to content

x/tools/gopls: multiple "Fill anonymous struct" quick fixes are confusing #48563

@suzmue

Description

@suzmue

What version of Go are you using (go version)?

$ go version
go version go1.17.1 darwin/amd64
$ gopls version
golang.org/x/tools/gopls v0.7.2
    golang.org/x/tools/gopls@v0.7.2 h1:kRKKdvA8GOzra8rhSFDClOR7hV/x8v0J0Vm4C/gWq8s=

When the cursor is inside multiple anonymous structs, the quick fixes for "Fill anonymous struct" do not differentiate between the two.

Screen Shot 2021-09-22 at 4 12 32 PM

This is confusing, as its impossible to tell which is for which struct.

What did you expect to see?

I would expect to see more detail about the anonymous structs or only a single "Fill anonymous struct" quick fix.

Example:
Screen Shot 2021-09-22 at 4 14 01 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions