deoplete-plugins / deoplete-go

Asynchronous Go completion for Neovim. deoplete source for Go.
MIT License
426 stars 28 forks source link

Gocode panicked: `[deoplete] NoneType: None` #134

Closed karlek closed 6 years ago

karlek commented 6 years ago

This minimal config panicks everytime a key is pressed when writing in a go file.

call plug#begin('~/.vim/plugged')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'zchee/deoplete-go',    { 'do': 'make'}
call plug#end()
let g:deoplete#enable_at_startup = 1
let g:deoplete#sources#go#gocode_binary = '$GOPATH/bin/gocode'

There is very little information from the panic:

[deoplete] NoneType: None
gocode panicked.  Use :messages / see above for error details.
$ go version
go version go1.11 linux/amd64

[~/go/src/github.com/nsf/gocode] $ git rev-parse HEAD
7b1d4e18cdc58a74dc1bd4c2d45b3f1b2ca227c3
Shougo commented 6 years ago

You should use https://github.com/mdempsky/gocode instead. nsf/gocode does not support go 1.10+. Please read README in nsf/gocode. https://github.com/nsf/gocode

karlek commented 6 years ago

Thank you, that was the problem.

If someone else has this problem, don't forget to kill your old gocode daemon with gocode exit (or pkill gocode if necessary)

cippaciong commented 5 years ago

If anyone using go modules stumbles into this issue and is already using mdempsky/gocode, please notice that mdempsky version does not support modules. As suggested in the README, try using stamblerre/gocode. Remember to stop the daemon with gocode close, delete $GOPATH/bin/gocode and replace it with the newer version from stamblerre go get -u github.com/stamblerre/gocode