Skip to content

Commit

Permalink
Fix deoplete completion
Browse files Browse the repository at this point in the history
  • Loading branch information
ViViDboarder committed Oct 25, 2017
1 parent 6cb6db8 commit 2061f3b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -10,3 +10,4 @@ vim/rc/*.local.rc.vim
vim/rc/plugins/*.local.rc.vim
vim/tmp/*
vim/tmp/viminfo.*
.DS_Store
13 changes: 11 additions & 2 deletions vim/rc/plugins/deoplete.rc.vim
Expand Up @@ -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 = {}
Expand Down

0 comments on commit 2061f3b

Please sign in to comment.