x/tools/gopls: provide useful snippets as completion suggestions for language keywords #65219
Labels
FeatureRequest
Issues asking for a new feature that does not need a proposal.
gopls/completion
Issues related to auto-completion in gopls.
gopls
Issues related to the Go language server, gopls.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
I always wondered what is supplying
func
as a completion suggestion after typing funcwhich I rarely end up selecting. Looking at golang/vscode-go#3144,
I finally bothered to check it, and obviously, it was
gopls
.If clients can handle snippets, and gopls is relatively sure that the user is about to type
func F() {}
(e.g. there is no following character in the same line, etc), is it better to provide longer snippets?Similarly, I type
c
, gopls suggestsconst
as the first candidate. If that's what I really intended, couldn't gopls even go further and place a space and move my cursor to define a const var rather than just stopping atconst
and letting me type space after accepting the keyword?The text was updated successfully, but these errors were encountered: