From f95e371be5e51e1ae36d80bf2e2ea9903abf4e46 Mon Sep 17 00:00:00 2001 From: GBProd Date: Fri, 6 Nov 2020 02:46:14 +0100 Subject: [PATCH] Add: Support auto_completion_complete_with_key_sequence for coc completion (#3939) --- autoload/SpaceVim/layers/autocomplete.vim | 4 ++-- config/plugins/coc.vim | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 config/plugins/coc.vim diff --git a/autoload/SpaceVim/layers/autocomplete.vim b/autoload/SpaceVim/layers/autocomplete.vim index 248e5cd3f..aa3bd7747 100644 --- a/autoload/SpaceVim/layers/autocomplete.vim +++ b/autoload/SpaceVim/layers/autocomplete.vim @@ -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', { diff --git a/config/plugins/coc.vim b/config/plugins/coc.vim new file mode 100644 index 000000000..fb5f53945 --- /dev/null +++ b/config/plugins/coc.vim @@ -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 %s =coc#refresh()', g:_spacevim_key_sequence) +endif