x/tools/gopls: improve completions with mutli-return value functions #36540
Milestone
Comments
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. |
Change https://golang.org/cl/215538 mentions this issue: |
Change https://golang.org/cl/215537 mentions this issue: |
gopherbot
pushed a commit
to golang/tools
that referenced
this issue
Feb 6, 2020
For example: // Prefer functions that return one or two values. Previously // we had no preference. foo, bar := <> // Prefer functions that return "(int)" or "(int, ??)". Previously we // only preferred the former. var foo int foo, bar := <> // Prefer functions that return "(int)" or "(int, int)". Previously we // only preferred the former. var foo func(int, int) foo(<>) In the above example, we don't handle "foo" being variadic yet. I also took the liberty to break up matchingCandidate() into separate functions since it was getting rather long. Updates golang/go#36540. Change-Id: I9140dd989dfde1ddcfcd9d2a14198045c02587f2 Reviewed-on: https://go-review.googlesource.com/c/tools/+/215537 Run-TryBot: Muir Manders <muir@mnd.rs> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We should make completion handle functions that return multiple values. For example:
All cases need to continue offering the existing scalar completions.
The text was updated successfully, but these errors were encountered: