Closed osleg closed 6 years ago
I cannot reproduce the both problems with https://github.com/mdempsky/gocode. And it is not deoplete-go's issue.
I'm using the latest gocode from the same repository above. And I feel like it does deoplete issue since running gocode directly on the file does provide results: Without GOOS:
$ gocode -f json --in main.go autocomplete 96
[0,[{"class":"func","package":"","name":"main","type":"func()"},{"class":"package","package":"","name":"sync","type":""},{"class":"type","package":"","name":"A","type":"struct"},{"class":"var","package":"","name":"a","type":"A"}]]
With GOOS:
$ GOOS=windows gocode -f json --in main.go autocomplete 96
[1,[{"class":"type","package":"sync","name":"Map","type":"struct"},{"class":"type","package":"sync","name":"Mutex","type":"struct"}]]
Offset 96 is right after the .
on line 12 a.M|
where |
is cursor position
Hence gocode doesn't actually panicking when trying to parse the data whether with GOOS or without.
If so, why I don't reproduce the problem? Please upload the minimal init.vim to reproduce it.
And deoplete-go is open source project. You can research the problem.
Hm... I removed deoplete and then installed it again and it works :thinking: probably was something wrong with my install
@Shougo was about to do minimal vimrc but it started to work :man_shrugging:
Oh... I see. I think gocode close
is needed.
With autocomplete on there are some (rare) cases where I get
gocode panicked. Use :messages / see above for error details
Here a screen shot
This happens in 2 cases:
If the package referred is not imported yet like above, eg
When running vim/go under non unix GOOS, eg
And then this code