x/tools/gopls: lo
package is not autocompleted if it's not already imported
#60964
Labels
FrozenDueToAge
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
lo
refers to https://github.com/samber/loI'm using gopls in vs code
gopls version
go env
Probably not relevant.
What did you do?
Any time I want to use
lo
, I typelo.
orlo<tab>
and it never gets auto-imported. I have to resort to typinglo.Map
and saving the file to trigger the auto-import.To repro just create this go.mod file:
and try auto-completing
lo
in a main.go file.After importing it successfully once, it seems to eventually start to pop up in suggestions.. but even then it's never first.
It really hurts the usability of this package when you can't get auto-completion without importing it first. I'm pretty sure there's something special about the length of the package name that's causing this because I haven't seen this problem with other packages.
What did you expect to see?
What did you see instead?
Editor and settings
nothing very relevant in settings.json
Logs
Sorry, I haven't dig into it deeper yet and set up extra logging.
The text was updated successfully, but these errors were encountered: