-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GoDef failed when using GoModules #2137
Comments
I just found the hint that
|
The function signature comes from either gocode or guru. If you're not seeing the |
How can I investigate what gocode returns when it'll be called from vim-go. With which parameters will it be called under the hood? |
|
@bhcleek Thank you very much for your instructions. I followed and I just tried to execute the following command:
But it hangs and no output will be produced. This was the command as it was in the messages list:
|
gocode is a server. After starting it on the commandline, you'll need to do the operation in Vim from which you're seeing the wrong output. |
Okay I tried it again, but it still no output. It seems, that VIM don't talk with this instance of gocode-gomod. I also explicitely repeated step 3 before. I started gocode in the debvug mode.
|
|
My project is using the module mode, so I think I should use gocode-gomode. But I also tried gocode with the same result. No output on the commandline..
|
I closed the issue because the main problem with GoDef is working now for me |
What did you do? (required. The issue will be closed when not provided.)
I've create a new project with using the Go module support, The project is located outside of the GOPATH directory. I've initialized it with
go mod init github.com/janbaer/sherlock
When I'm in the main.go and I want to go to a function of sub package with using GoDef it fails.
What did you expect to happen?
It should jump to the expected function
What happened instead?
I just see the error in the status line: vim-go: [searching declaration] FAIL
When I go into the function manually I see the following output in the status line:
but the function name is HandleInspect. It's the same with any other function in this package and also other packages.
Navigating to local functions works. It works also in other projects without but also with GoModules support.
Configuration (MUST fill this out):
vim-go version: latest master
vimrc
you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):Vim version (first three lines from
:version
):VIM - Vi IMproved 8.1 (2018 May 18, compiled Jan 28 2019 15:24:39)
Included patches: 1-837
Go version (
go version
): 1.11.4Go environment (
go env
):GOARCH="amd64"
GOBIN=""
GOCACHE="/home/jan/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/jan/Projects/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/jan/Projects/sherlock/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build410959908=/tmp/go-build -gno-record-gcc-switches"
The text was updated successfully, but these errors were encountered: