-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.gopls/completionIssues related to auto-completion in gopls.Issues related to auto-completion in gopls.
Milestone
Description
gopls version
v0.14.2
go env
irrelevantWhat did you do?
I have an existing expression f(a), and I would like to replace it with f(protocol.FWithLongName(a)). After typing protocol.F, the only useful completion offered is the function snippet, which would complete as
f(protocol.FWithLongName(x protocol.TypeWithLongName, y TypeOfSecondArg)(a))
which requires too much editing.
What did you expect to see?
I would like to have seen both the function snippet and just the function names as suggested completions.
What did you see instead?
The unsyntactic completion described above. gopls is not looking at the context when it proposed a snippet where there is already an argument.
Editor and settings
No response
Logs
No response
Metadata
Metadata
Assignees
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.gopls/completionIssues related to auto-completion in gopls.Issues related to auto-completion in gopls.