4

I know that a similar was asked on Intellisense not working golang test files, but since I am new to VS Code I didn't quite understand the solution. Also since I have a low reputation I couldn't comment for help.

What I know about my problem is that on Ctrl + Space VSCode used to show the list of functions associated with the Golang package, but suddenly one day it stopped working.

6
  • This link might help - code.visualstudio.com/docs/languages/go check if go.autocompleteUnimportedPackages is enabled as true in your vscode settings. Commented Jul 8, 2020 at 6:53
  • Can you try to uninstall "Go" extension in VS code and then reinstall it? Commented Jul 8, 2020 at 7:42
  • @Zoinks I had already done that but it didn't work. I even tried using the nightly version of the extension but still, it didn't work. Commented Jul 8, 2020 at 8:29
  • @Harshit it is set to true. Just to make sure I set it false and then changed it back to true, still no IntelliSense. Commented Jul 8, 2020 at 8:35
  • @Harshit can you tell me if [code]("python.languageServer": "Microsoft",) should be in my go extension's settings.json Commented Jul 8, 2020 at 8:48

1 Answer 1

6

Okay, I found out my answer. Apparently for some reason in my settings.json the line "go.useLanguageServer": true, wasn't there. After adding it VSCode told me to install something called gopls which fixed everything.

Sign up to request clarification or add additional context in comments.

1 Comment

In my case the language server was running but I had not declared the folder I was working in in the go.work file. More information: github.com/golang/tools/blob/master/gopls/doc/workspace.md

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.