The plugin needs to be reloaded each time a new .go file is created
The plugin needs to be reloaded each time a new empty .go file is created or a new empty .go file is opened.
MacOS 12.1 (21C52) Nova app 8.3 Build 343365 Go Extension 0.4.3
Extension Console Log:
Go Language Server [23:57:11.598000] 2021/12/31 23:57:11 no completions found: %!w(getting file for Completion: <nil> (package completions: line is beyond end of file 1))
position={3 0}
---
Go Language Server[23:57:11.857000] 2021/12/31 23:57:11 imports fixes: AllImportsFixes: /Volumes/Macintosh HD/Users/user/code/sn/cmd/web/test.go:1:1: expected ';', found 'EOF' (and 2 more errors)
file="/Volumes/Macintosh HD/Users/user/code/sn/cmd/web/test.go"
---
Go Language Server[23:57:11.857000] 2021/12/31 23:57:11 analyzer "tests" failed: analysis tests for package github.com/user/sn/cmd/web panicked: runtime error: invalid memory address or nil pointer dereference
---
Go Language Server[23:57:11.858000] 2021/12/31 23:57:11 no completions found: %!w(getting file for Completion: <nil> (package completions: line is beyond end of file 1))
position={3 0}
---
Go Language Server[23:57:11.892000] 2021/12/31 23:57:11 no highlight: line is beyond end of file 1
URI=file:///Volumes/Macintosh HD/Users/user/code/sn/cmd/web/test.go
---
Go Language Server[23:57:12.153000] 2021/12/31 23:57:12 no highlight: line is beyond end of file 1
URI=file:///Volumes/Macintosh HD/Users/user/code/sn/cmd/web/test.go
Eek. Ok, thanks so much for reporting, I'm a little confused with what's going on!
How about this bug? Is there any progress?
Actually, no! I really can't reproduce it. I wonder, what version of gopls are you running?
I'm currently using v0.8.3, creating blank .go files, and I don't see any of the above happening...
Nova App 9.3 (Build 396482) Go Extension 0.4.3 gopls v0.8.3
as you can see at the beginning of the video the autocomplete does not work, after the extension restart, the autocomplete works.
https://user-images.githubusercontent.com/29234307/166669495-51875f36-ffea-4a71-aedf-eb7213a57073.mp4