5

gopls in neovim, using lspconfig, does not seem to be working with any go file, even one that has a .git or go.mod file. My lspconfig can be found below, and after that is a LspInfo in a .go file showing it should be working. Any help would be much appreciated!


lspconfig["gopls"].setup({
    capabilities = capabilities,
    on_attach = on_attach,
})


enter image description here

I've gone through almost every reddit post on this, and have tried messing with my go env, but nothing seems to be working. I've also looked a logs, and they do mention go_proxy=Off, but my go env says differently, which is weird.

Darst King
  • 63
  • 4
  • Have you checked than your `gopls` binary execs correctly ? In your screenshot, we can see `pid: nil` for `gopls`. – lcheylus Oct 28 '22 at 10:40
  • @lcheylus how would I do that, and if it does not what would the fix be? – Darst King Oct 28 '22 at 11:36
  • For example, check `gopls` version with command `gopls version` and print `gopls` API in JSON format with `gopls api-json`. – lcheylus Oct 29 '22 at 13:22

0 Answers0