Try coc.vim for completion
This commit is contained in:
parent
bb247f7bdd
commit
6e8e05ae44
|
@ -4,15 +4,17 @@ if !exists('g:deoplete#omni#input_patterns')
|
|||
endif
|
||||
|
||||
" <C-h>, <BS>: close popup and delete backword char.
|
||||
inoremap <expr><C-h> deoplete#smart_close_popup()."\<C-h>"
|
||||
inoremap <expr><BS> deoplete#smart_close_popup()."\<C-h>"
|
||||
"inoremap <expr><C-h> deoplete#smart_close_popup()."\<C-h>"
|
||||
"inoremap <expr><BS> deoplete#smart_close_popup()."\<C-h>"
|
||||
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ "\<C-x><C-o>"
|
||||
\ coc#refresh()
|
||||
"\ '\<C-x><C-o>'
|
||||
|
||||
function! s:check_back_space()
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~ '\s'
|
||||
endfunction
|
||||
inoremap <silent><expr> <c-space> coc#refresh()
|
||||
|
|
2
init.vim
2
init.vim
|
@ -44,7 +44,7 @@ set showcmd
|
|||
|
||||
set ignorecase smartcase
|
||||
set inccommand=split
|
||||
set completeopt=menu,longest,preview
|
||||
set completeopt=menu,noinsert,preview
|
||||
set wildmode=list:longest,list:full
|
||||
set wildignore+=*.so,*.swp,*.zip,*.o
|
||||
set suffixes=.bak,~,.h,.info,.swp,.obj,.info,.aux,.dvi,.bbl,.out,.o,.lo,\.class
|
||||
|
|
|
@ -30,7 +30,9 @@ Plug 'Chiel92/vim-autoformat'
|
|||
|
||||
" completion and snippets
|
||||
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
|
||||
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||
"Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
|
||||
|
||||
|
||||
Plug '/usr/share/vim/vimfiles'
|
||||
|
|
Loading…
Reference in a new issue