Skip to content

x/tools/gopls: support completing to Elem() type for slices, etc. #46045

Closed
@muirdm

Description

@muirdm

In the example:

var f func() string
var s []string
var a [1]string
var ch chan string
var m map[int]string

var _ string = <>

It would be nice if <> preferred s, a, ch, and m. We already prefer f. The completion candidate should include the appropriate expression to access the element type, such as s[<>] for indexable things, or <-ch for channels.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.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