fatih / vim-go

Go development plugin for Vim
https://www.patreon.com/bhcleek
Other
16.02k stars 1.45k forks source link

Auto completion not showing up as I type when using ncm2 #2288

Closed delfick closed 5 years ago

delfick commented 5 years ago

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

I'm used to vim making the auto completion box come up as I type, but it no longer does that and I have to press C-X,C-O for it to come up.

The good news is c-x,c-o works but I want it to appear as I'm typing and I can't figure out why it doesn't do that anymore. I even made my vim-go go back to the version I was last on (commit 661e2b21a2b4389add224d72ae7e09effd6ad339) and it doesn't work there either.

To be honest I'm not sure if this is the right place for this question, but I'm not sure if it's a problem with vim-go, ncm2 or my environment.

What happened instead?

I don't see autocompletion suggestions based on the types in my go project. Even when I'm in a non go modules project under GOPATH

Configuration (MUST fill this out):

vim-go version:

(stephenmoore) ~/.vim/plugged/vim-go
 15:02 ──   git rev-parse HEAD
c4b419db6c57125e91d6f292daa664b73b155b7b

vimrc you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):

call plug#begin('~/.vim/plugged')
Plug 'fatih/vim-go'
Plug 'ncm2/ncm2'
call plug#end()
autocmd BufEnter  *  call ncm2#enable_for_buffer()

The following works in my python projects

call plug#begin('~/.vim/plugged')
Plug 'davidhalter/jedi-vim'
Plug 'roxma/nvim-yarp'
Plug 'ncm2/ncm2-jedi'
Plug 'ncm2/ncm2'
call plug#end()
autocmd BufEnter  *  call ncm2#enable_for_buffer()

Vim version (first three lines from :version):

NVIM v0.3.4
Build type: Release
LuaJIT 2.0.5

Go version (go version):

go version go1.12 darwin/amd64

Go environment

go env Output:
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/stephenmoore/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/stephenmoore/.go"
GOPROXY=""
GORACE=""
GOROOT="/Users/stephenmoore/.gimme/versions/go1.12.darwin.amd64"
GOTMPDIR=""
GOTOOLDIR="/Users/stephenmoore/.gimme/versions/go1.12.darwin.amd64/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/sk/1mvjp30s28l6yk7hydgkvphr0000gn/T/go-build176032455=/tmp/go-build -gno-record-gcc-switches -fno-common"

bhcleek commented 5 years ago

If C-X,C-o works, then the issue isn't with vim-go.

delfick commented 5 years ago

fair enough

delfick commented 5 years ago

though, I figured it out, it was never vim-go giving me auto completion, but rather autozimu/LanguageClient-neovim which was using golang-server which got uninstalled when I wiped out ~/.go/bin because things were being weird.

Sorry for the noise!