x/tools/gopls: no completions provided in some seemingly straightforward cases #69492
Labels
gopls/completion
Issues related to auto-completion in gopls.
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
gopls version
go env
What did you do?
I have a text file like this, where
|
represents the cursor position:What did you see happen?
I invoked completion (the LSP action is
textDocument/completion
) and got zero results.I also used the gopls rpc trace log to verify that gopls got the request and was sending back zero items, so it's not related to some editor integration issue.
What did you expect to see?
I want to see
foobar
as a suggested completion (probably the only one).Here are some similar situations where
foobar
is the suggested completion:Editor and settings
No response
Logs
The completion trace request/response looks like this:
The text was updated successfully, but these errors were encountered: