You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I updated gopls to v0.12.0, but code completion does not work when using lowercase letters. When I roll back to v0.11.0, it works fine. I noticed that when using v0.12.0 for the first time and typing fmt.p, code completion works normally. However, after saving the code and using fmt.p for the second time, code completion does not work.
The text was updated successfully, but these errors were encountered:
gopherbot
added
Tools
This label describes issues relating to any tools in the x/tools repository.
gopls
Issues related to the Go language server, gopls.
labels
Jun 1, 2023
After testing it out a bit, I think the problem is simply that unimported completion (the completion gopls provides for packages that aren't yet imported) is case-sensitive, whereas normal completion is not.
@limitcool is that consistent with what you observe?
After testing it out a bit, I think the problem is simply that unimported completion (the completion gopls provides for packages that aren't yet imported) is case-sensitive, whereas normal completion is not.
@limitcool is that consistent with what you observe?
Fix incoming.
When I first opened VS Code, I noticed that fmt code completion worked in lowercase even without importing fmt. However, once I saved the file, if fmt was not imported, lowercase code completion would stop working. If I manually imported fmt, lowercase code completion would continue to work.
I also noticed some other issues. For example, if I used fmt in a package, after importing that package, fmt.p code completion would stop working immediately, even when first opening VS Code, and I would be unable to get code completion. If I manually imported fmt, code completion would resume.
gopls version
golang.org/x/tools/gopls v0.12.0
go: go1.20.4
What did you do?
I updated gopls to v0.12.0, but code completion does not work when using lowercase letters. When I roll back to v0.11.0, it works fine. I noticed that when using v0.12.0 for the first time and typing fmt.p, code completion works normally. However, after saving the code and using fmt.p for the second time, code completion does not work.
Build info
golang.org/x/tools/gopls v0.12.0
golang.org/x/tools/gopls@v0.12.0 h1:O8KGdGuvu3YmAwim3KYmV2l20Cce5VMS74LayO2cDw8=
github.com/BurntSushi/toml@v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
github.com/google/go-cmp@v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
golang.org/x/exp@v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA=
golang.org/x/exp/typeparams@v0.0.0-20221212164502-fae10dda9338 h1:2O2DON6y3XMJiQRAS1UWU+54aec2uopH3x7MAiqGW6Y=
golang.org/x/mod@v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=
golang.org/x/sync@v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI=
golang.org/x/sys@v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
golang.org/x/text@v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
golang.org/x/tools@v0.9.2-0.20230524171317-188b785caf35 h1:B5e02cBXQWRAs5SloauCQ9RXMKeqz96eIBJ3W9Ofy+U=
golang.org/x/vuln@v0.0.0-20230110180137-6ad3e3d07815 h1:A9kONVi4+AnuOr1dopsibH6hLi1Huy54cbeJxnq4vmU=
honnef.co/go/tools@v0.4.2 h1:6qXr+R5w+ktL5UkwEbPp+fEvfyoMPche6GkOpGHZcLc=
mvdan.cc/gofumpt@v0.4.0 h1:JVf4NN1mIpHogBj7ABpgOyZc65/UUOkKQFkoURsz4MM=
mvdan.cc/xurls/v2@v2.4.0 h1:tzxjVAj+wSBmDcF6zBB7/myTy3gX9xvi8Tyr28AuQgc=
go: go1.20.4
The text was updated successfully, but these errors were encountered: