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: support converting array to slice when completing #40277

Closed
muirdm opened this issue Jul 17, 2020 · 6 comments
Closed

x/tools/gopls: support converting array to slice when completing #40277

muirdm opened this issue Jul 17, 2020 · 6 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. help wanted Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@muirdm
Copy link

muirdm commented Jul 17, 2020

When working with arrays you often need to convert them to slices. It would be nice if gopls offered completion candidates that did this for you:

package main

import "os"

func main() {
	var a [32]byte
	os.Stdout.Write(<>) // offer `a[:]` as a candidate
}
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Jul 17, 2020
@gopherbot gopherbot added this to the Unreleased milestone Jul 17, 2020
@stamblerre stamblerre removed this from the Unreleased milestone Jul 17, 2020
@hasheddan
Copy link
Contributor

Happy to take this one if no one else is already working on it!

/cc @stamblerre @muirdm

@muirdm
Copy link
Author

muirdm commented Aug 8, 2020

I'm not working on it. Happy to give pointers if needed!

@muirdm
Copy link
Author

muirdm commented Aug 25, 2020

@hasheddan How is it going? Are you still tinkering with this?

@hasheddan
Copy link
Contributor

@muirdm I am still interested in tackling this, but was out of office last week so I haven't gotten to it yet. Would likely have time this weekend, but certainly understand if the team needs to go ahead and move forward :)

@muirdm
Copy link
Author

muirdm commented Aug 25, 2020

No worries, take your time.

@stamblerre stamblerre added this to the gopls/unplanned milestone Oct 21, 2020
@gopherbot
Copy link

Change https://golang.org/cl/311169 mentions this issue: lsp/completion: offer candidates converting arrays to slices

@golang golang locked and limited conversation to collaborators Apr 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. help wanted Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants