aboutsummaryrefslogtreecommitdiff
path: root/.vim/after/plugin/deoplete.vim
blob: a42289001e90e31fb6b917f70611a831c698aef8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
if has('nvim')
    finish
endif

inoremap <silent><expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
inoremap <silent><expr><s-tab> pumvisible() ? "\<c-p>" : "\<s-tab>"

let g:deoplete#enable_at_startup = 1

packadd nvim-yarp
packadd vim-hug-neovim-rpc
packadd deoplete.nvim
packadd deoplete-vim-lsp

call deoplete#custom#option({
        \ 'smart_case': v:true,
        \ 'min_pattern_length': 1,
        \ 'yarp': v:true,
        \ })

call deoplete#custom#source('ultisnips', 'rank', 1000)
call deoplete#custom#source('lsp', 'rank', 900)

function! s:my_cr_function() abort
    return deoplete#close_popup() . "\<CR>"
endfunction
inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR>