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

Can't get autocompletion to work #1893

Closed
predmijat opened this issue Jul 20, 2018 · 1 comment
Closed

Can't get autocompletion to work #1893

predmijat opened this issue Jul 20, 2018 · 1 comment

Comments

@predmijat
Copy link

predmijat commented Jul 20, 2018

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

Trimmed down .vimrc to use only fatih/vim-go, maralla/completor, and nsf/gocode, ran ViM, and autocomplete, while displaying dropdown menu, doesn't actually autocomplete.

I also tried to downgrade ViM (found at #1860) - didn't help.

What did you expect to happen?

This is where it gets funny :) I'm not sure what should happen, but in dropdown menu I see NewRGBA func(r image.Rectangle) *image.RGBA, and when I press TAB, C-y, CR, or anything else I found on the internet, I end up with only image.NewRGBA. I'm guessing I should get more than that?

What happened instead?

Explained above.

Configuration (MUST fill this out):

  • vim-go version:
    latest? I ran :PlugUpgrade, says it's up to date

  • 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/plugins')

Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'maralla/completor.vim'
Plug 'nsf/gocode', { 'rtp': 'vim', 'do': '~/.vim/plugins/gocode/vim/symlink.sh' }

call plug#end()

filetype plugin on

" tried this from completor readme, didn't help
"inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
"inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
"inoremap <expr> <cr> pumvisible() ? "\<C-y>\<cr>" : "\<cr>"

" and this
"inoremap <expr> <Tab> pumvisible() ? "<C-N>" : "<C-R>=completor#do('complete')<CR>"
  • Vim version (first three lines from :version):
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jul  5 2018 21:32:54)
macOS version
Included patches: 1-150
  • Go version (go version):
    go version go1.10.3 darwin/amd64

  • Go environment (go env):

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/predmijat/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/predmijat/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.10.3/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.10.3/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
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/z2/h0jzdf8x0gdfnt339r0_68kr0000gn/T/go-build495673391=/tmp/go-build -gno-record-gcc-switches -fno-common"

If I can provide some other info, please let me know.

Thanks

@bhcleek
Copy link
Collaborator

bhcleek commented Jul 21, 2018

It sounds like autocompletion is working correctly:

  1. you were presented with some autocompletion options
  2. you chose one
  3. the buffer was modified accordingly

@bhcleek bhcleek closed this as completed Jul 21, 2018
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