Skip to content
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

gocode does not return and vim hangs during autocomplete #2001

Closed
pavannaganna opened this issue Sep 26, 2018 · 1 comment
Closed

gocode does not return and vim hangs during autocomplete #2001

pavannaganna opened this issue Sep 26, 2018 · 1 comment

Comments

@pavannaganna
Copy link

What did you do? (required. The issue will be closed when not provided.)

I am trying to get autocomplete for any struct. The vim hangs and I see gocode is taking longer time to respond

What did you expect to happen?

To see the autocomplete soon.

What happened instead?

The vim hangs and I see gocode is taking longer time to respond

Configuration (MUST fill this out):

  • vim-go version:

  • 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 Sep 22 2018 13:27:07)

  • Go version (go version):
    go version go1.11 darwin/amd64

  • Go environment (go env):

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/pavannaganna/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/pavannaganna/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/b0/b_bbtmxj1y18qhn3kwgc693m0000gn/T/go-build240945845=/tmp/go-build -gno-record-gcc-switches -fno-common"

@bhcleek
Copy link
Collaborator

bhcleek commented Sep 26, 2018

vim-go uses github.com/mdempsky/gocode's -source parameter by default to provide a reliable use experience, but that comes at the cost of performance. If you'd like to disable the -source parameter, you can do so by using (see :help g:go_gocode_propose_source). Doing so will provide a faster experience, but you'll have to be sure to install the packages that you want to autocomplete on your own by using go install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants