VS Code Go intellisense causing problems

210 views
Skip to first unread message

Fuji Nafiul

unread,
Sep 27, 2022, 2:46:04 PM9/27/22
to golang-nuts
fmt.Printf("hello") was working great with intellisense
go_pb_3.png

but suddenly in every go file my fmt.P .. suggestion becomes this
go_pb_1.png

and this 

go_pb_2.png

I am not getting "fmt.Printf()" suggestions anymore and getting stuck with those "const", "func", "import", "type", & "var".. what is happening? (Though it is not suggesting fmt.Printf() but it's still working). how can I get normal suggestions by intellisense like previous?


I tried disabling GO official extension, then it got fixed but also I lose all autocomplete/suggestion feature. a go file in root directory is working fine but other files inside packages are showing this kinda problems. Please help

Robert Findley

unread,
Sep 28, 2022, 2:21:37 PM9/28/22
to golang-nuts
Hi,

Can you follow the instructions at https://github.com/golang/vscode-go/blob/master/docs/troubleshooting.md to try to diagnose the problem? It sounds like your workspace is broken and/or you are having trouble with the language server. Please try troubleshooting, and if you are unable to get it working and believe it to be broken, file an issue at https://github.com/golang/vscode-go/issues/new/choose with more details.

Thanks,
- Rob

Fuji Nafiul

unread,
Sep 28, 2022, 10:37:35 PM9/28/22
to golang-nuts
After searching a lot I couldn't find exact problem and solution. And somehow I saw some were facing **"case-insensitive import collision:"** and it was due to upper-case and lower-case mixture usage in filename. I remembered it seeing in my package name (though this error vanishes sometimes and ignored it as code execution was working) and tried renaming my filename from "sequenceUtils.go" to "sequence_utils.go" and boom ..! intellisense started working ..! though my colleague was working with same filename and he wasn't facing problems..

I think the problem should be properly identified..!
Reply all
Reply to author
Forward
0 new messages