-
-
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
GoInfo doesn't work on assigned variables #2119
Comments
Thank you for the report. There are some of pieces of information that could help us get to the bottom of this:
You might consider debugging gocode to see if it's having a problem. You can do that by closing VSCode (to make sure it's
And then try your test again in vim-go. You should see some output in the terminal window where you're running the server. You might consider switching to guru by setting |
How come VScode is instant btw? Do they not share the same gocode?
https://s.natalian.org/2019-01-08/gocode-debug.mp4 <-- debugging on my Arch machine gocode does seem like a mysterious beast and neovim's :GoInfo's result of I'm none the wiser why it fails on Arch. I got it working on Void by install a dependency Back on Arch, Really puzzled by these parse errors in gocode debug. With https://s.natalian.org/2019-01-08/main.go <-- this code runs fine ! On Void it doesn't show the type, debug is:
|
gocode is intended for autocompletion. As such, when it's used for getting type info, it only takes up to the cursor position into account. That's why you were seeing a couple of results from gocode: when on the
You might consider raising an issue with https://github.com/mdempsky/gocode about the errors you saw later in the gocode output, though. |
I took another look at how gocode is used when getting identifier info, and realized that the information I gave you there is wrong. It actually does try to match the identifier under the cursor to the candidates that are provided from gocode. |
What did you do? (required. The issue will be closed when not provided.)
https://s.natalian.org/2019-01-07/go-info.mp4
What did you expect to happen?
Hover over svc and for it to indicate it's type *S3
What happened instead?
Nothing
Configuration (MUST fill this out):
v1.19-88-g8342cd4
https://github.com/kaihendry/dotfiles/blob/master/.config/nvim/init.vim
*```
NVIM v0.3.3
Build type: Release
LuaJIT 2.0.5
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/hendry/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/hendry/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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-build906482915=/tmp/go-build -gno-record-gcc-switches"
The text was updated successfully, but these errors were encountered: