linux (Lubuntu 17.10) 2018.02
neovim with vim-plugin, vim-go and deoplete.vim code completion
prerequisites:
go -Installation
Python3 or Anaconda3 (- use pip for python neovim needed by deoplete)
export PATH=$PATH:/usr/local/go/bin
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
$ sudo apt-get update
$ sudo apt-get install neovim
( –> vs 0.2.0 in ~/.local/share/nvim )
$ pip install neovim
$ cd ~/.local/share/nvim/
$ git clone https://github.com/Shougo/deoplete.nvim.git
$ curl -fLo ~/.local/share/nvim/site/autoload/plug.vim –create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
$ mkdir ~/.local/share/nvim/plugged
$ mkdir ~/.config/nvim/
$ nvim ~/.config/nvim/init.vim
call plug#begin('~/.local/share/nvim/plugged')
Plug 'junegunn/vim-easy-align'
Plug 'https://github.com/junegunn/vim-github-dashboard.git'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'fatih/vim-go', { 'tag': '*' }
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
if has('nvim')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
else
Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
endif
Plug 'zchee/deoplete-go', { 'do': 'make'}
Plug 'terryma/vim-multiple-cursors'
call plug#end()
" neocomplete like
set completeopt+=noinsert
" deoplete.nvim recommend
set completeopt+=noselect
" Path to python interpreter for neovim
let g:python3_host_prog = '/path/to/python'
" Skip the check of neovim module
let g:python3_host_skip_check = 1
" Run deoplete.nvim automatically
let g:deoplete#enable_at_startup = 1
" deoplete-go settings
let g:deoplete#sources#go#gocode_binary = $GOPATH.'/bin/gocode'
let g:deoplete#sources#go#sort_class = ['package', 'func', 'type', 'var', 'const']
let g:go_auto_type_info = 1
" Disable deoplete when in multi cursor mode
function! Multiple_cursors_before()
let b:deoplete_disable_auto_complete = 1
endfunction
function! Multiple_cursors_after()
let b:deoplete_disable_auto_complete = 0
endfunction
restart nvim
:PlugInstall
:GoInstallBinaries
___and you’re DONE___