x/tools/gopls: completions favour imports over local variables once a second letter is typed #65103
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
v0.14.2
go env
What did you do?
For reproduction, I made a simple project by:
go mod init go_example
in it.hello.go
with following contents:To reproduce, I started typing the name of the variable as the second argument to fmt.Printf, i.e.:
which produces a reasonable list of completions:

But then I type a second letter i.e.:
and the order of completions becomes less useful:

What did you see happen?
Once I started typing more than one letter of the variable name, import names started being favoured over the local variable name, which keeps happening up until I type "resource":


What did you expect to see?
I expected
resourceName
local variable to be shown as the first completion over the imports.Editor and settings
Sublime Text with LSP-gopls extension (v1.14.2) using default settings.
Logs
gopls.log
The text was updated successfully, but these errors were encountered: