Fix deoplete completion

This commit is contained in:
ViViDboarder 2017-10-25 10:30:08 -07:00
parent 6cb6db86bc
commit 2061f3b219
2 changed files with 12 additions and 2 deletions

1
.gitignore vendored
View File

@ -10,3 +10,4 @@ vim/rc/*.local.rc.vim
vim/rc/plugins/*.local.rc.vim
vim/tmp/*
vim/tmp/viminfo.*
.DS_Store

View File

@ -5,8 +5,17 @@ Plug 'Shougo/neco-syntax'
Plug 'zchee/deoplete-jedi', { 'for': 'python' }
Plug 'zchee/deoplete-go', { 'do': 'make' }
inoremap <silent><expr> <C-Space> pumvisible() ? "\<C-n>" : deoplete#mappings#manual_complete()
inoremap <silent><expr> <nul> pumvisible() ? "\<C-n>" : deoplete#mappings#manual_complete()
" inoremap <silent><expr> <nul> pumvisible() ? "\<C-n>" : deoplete#mappings#manual_complete()
inoremap <silent><expr> <C-Space>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<C-Space>" :
\ deoplete#manual_complete()
function! s:check_back_space() abort "{{{
let col = col('.') - 1
return !col || getline('.')[col - 1] =~ '\s'
endfunction
"}}}
if !exists('g:deoplete#sources')
let g:deoplete#sources = {}