1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 10:20:05 +08:00

Add: Support auto_completion_complete_with_key_sequence for coc completion (#3939)

This commit is contained in:
GBProd 2020-11-06 02:46:14 +01:00 committed by GitHub
parent f1bff22dd4
commit f95e371be5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -75,9 +75,9 @@ function! SpaceVim#layers#autocomplete#plugins() abort
\ }])
elseif g:spacevim_autocomplete_method ==# 'coc'
if executable('yarn')
call add(plugins, ['neoclide/coc.nvim', {'merged': 0, 'build': 'yarn install --frozen-lockfile'}])
call add(plugins, ['neoclide/coc.nvim', {'loadconf': 1, 'merged': 0, 'build': 'yarn install --frozen-lockfile'}])
else
call add(plugins, ['neoclide/coc.nvim', {'merged': 0, 'rev': 'release'}])
call add(plugins, ['neoclide/coc.nvim', {'loadconf': 1, 'merged': 0, 'rev': 'release'}])
endif
elseif g:spacevim_autocomplete_method ==# 'deoplete'
call add(plugins, [g:_spacevim_root_dir . 'bundle/deoplete.nvim', {

5
config/plugins/coc.vim Normal file
View File

@ -0,0 +1,5 @@
if !empty(g:_spacevim_key_sequence)
\ && g:_spacevim_key_sequence !=# 'nil'
\ && g:spacevim_escape_key_binding !=# g:_spacevim_key_sequence
exe printf('imap <silent>%s <C-r>=coc#refresh()<CR>', g:_spacevim_key_sequence)
endif