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: improve completions with mutli-return value functions #36540

Open
muirdm opened this issue Jan 14, 2020 · 3 comments
Open

x/tools/gopls: improve completions with mutli-return value functions #36540

muirdm opened this issue Jan 14, 2020 · 3 comments
Labels

Comments

@muirdm
Copy link

@muirdm muirdm commented Jan 14, 2020

We should make completion handle functions that return multiple values. For example:

// uprank functions that return two values
f, err := <>

var f *os.File
var err error

// uprank functions that return (*os.File, error)
f, err = <>

myFunc := func(int, bool) {}

// uprank functions that return (int, bool)
myFunc(<>)

All cases need to continue offering the existing scalar completions.

@gopherbot gopherbot added this to the Unreleased milestone Jan 14, 2020
@gopherbot gopherbot added the Tools label Jan 14, 2020
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jan 14, 2020

Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here.

@gopherbot gopherbot added the gopls label Jan 14, 2020
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jan 21, 2020

Change https://golang.org/cl/215538 mentions this issue: internal/lsp/source: handle completing into variadic params

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jan 21, 2020

Change https://golang.org/cl/215537 mentions this issue: internal/lsp/source: improve completion involving multiple return values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.