asyncomplete-gocode.vim icon indicating copy to clipboard operation
asyncomplete-gocode.vim copied to clipboard

provides go autocomplete for asyncomplete.vim via gocode

Go source for asyncomplete.vim via gocode

Provide Go autocompletion source for asyncomplete.vim via gocode

Installing

Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/asyncomplete-gocode.vim'

Registration

call asyncomplete#register_source(asyncomplete#sources#gocode#get_source_options({
    \ 'name': 'gocode',
    \ 'allowlist': ['go'],
    \ 'completor': function('asyncomplete#sources#gocode#completor'),
    \ 'config': {
    \    'gocode_path': expand('~/go/bin/gocode')
    \  },
    \ }))

Note: config is optional. gocode_path defaults to gocode i.e., gocode binary should exist in the PATH if config is not specified.

Credits