x/tools/gopls: cannot find module providing package {x} module lookup disabled by GOPROXY=off #56717
Labels
gopls/metadata
Issues related to metadata loading in gopls
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
ATTENTION: Please answer these questions BEFORE submitting your issue. Thanks!
What did you do?
created a new project with go mod init [project]
used it inside main.go
What did you expect to see?
gopls shouldn't show error
What did you see instead?
could not import github.com/go-chi/chi/v5 (no required module provides package "github.com/go-chi/chi/v5")
go env
Relevant LSPInfo
lsp.log gopls -rpc.trace
gopls -rpc.trace -v check main.go
LSPconfig
Behaviour
Only happens while using go get or go mod tidy.
Build info
I tried gopls with VSCode and it works. The one difference I noticed is go/packages.Load is triggered when the I fetch new packages with
go get
in VSCode + gopls but the same doesn't happen when I use neovim native lsp + gopls. The packages.Load triggers only on LspRestart in neovim.The text was updated successfully, but these errors were encountered: