mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:50:05 +08:00
perf(cmp): lazy load nvim-cmp
This commit is contained in:
parent
b0b0762037
commit
d40346455c
@ -92,28 +92,32 @@ function! SpaceVim#layers#autocomplete#plugins() abort
|
|||||||
" use bundle nvim-cmp
|
" use bundle nvim-cmp
|
||||||
call add(plugins, [g:_spacevim_root_dir . 'bundle/nvim-cmp', {
|
call add(plugins, [g:_spacevim_root_dir . 'bundle/nvim-cmp', {
|
||||||
\ 'merged' : 0,
|
\ 'merged' : 0,
|
||||||
\ 'loadconf' : 1,
|
\ 'loadconf' : 1, 'on_event' : ['InsertEnter'],
|
||||||
\ }])
|
\ }])
|
||||||
call add(plugins, [g:_spacevim_root_dir . 'bundle/cmp-buffer', {
|
call add(plugins, [g:_spacevim_root_dir . 'bundle/cmp-buffer', {
|
||||||
\ 'merged' : 0,
|
\ 'merged' : 0,
|
||||||
|
\ 'on_event' : ['InsertEnter'],
|
||||||
\ }])
|
\ }])
|
||||||
call add(plugins, [g:_spacevim_root_dir . 'bundle/cmp-path', {
|
call add(plugins, [g:_spacevim_root_dir . 'bundle/cmp-path', {
|
||||||
\ 'merged' : 0,
|
\ 'merged' : 0,
|
||||||
|
\ 'on_event' : ['InsertEnter'],
|
||||||
\ }])
|
\ }])
|
||||||
call add(plugins, [g:_spacevim_root_dir . 'bundle/cmp-cmdline', {
|
call add(plugins, [g:_spacevim_root_dir . 'bundle/cmp-cmdline', {
|
||||||
\ 'merged' : 0,
|
\ 'merged' : 0,
|
||||||
|
\ 'on_event' : ['InsertEnter'],
|
||||||
\ }])
|
\ }])
|
||||||
call add(plugins, [g:_spacevim_root_dir . 'bundle/lspkind-nvim', {
|
call add(plugins, [g:_spacevim_root_dir . 'bundle/lspkind-nvim', {
|
||||||
\ 'merged' : 0,
|
\ 'merged' : 0,
|
||||||
\ 'loadconf' : 1,
|
\ 'loadconf' : 1, 'on_event' : ['InsertEnter'],
|
||||||
\ }])
|
\ }])
|
||||||
call add(plugins, [g:_spacevim_root_dir . 'bundle/cmp-dictionary', {
|
call add(plugins, [g:_spacevim_root_dir . 'bundle/cmp-dictionary', {
|
||||||
\ 'merged' : 0,
|
\ 'merged' : 0,
|
||||||
\ 'loadconf' : 1,
|
\ 'loadconf' : 1, 'on_event' : ['InsertEnter'],
|
||||||
\ }])
|
\ }])
|
||||||
if g:spacevim_snippet_engine ==# 'neosnippet'
|
if g:spacevim_snippet_engine ==# 'neosnippet'
|
||||||
call add(plugins, [g:_spacevim_root_dir . 'bundle/cmp-neosnippet', {
|
call add(plugins, [g:_spacevim_root_dir . 'bundle/cmp-neosnippet', {
|
||||||
\ 'merged' : 0,
|
\ 'merged' : 0,
|
||||||
|
\ 'on_event' : ['InsertEnter'],
|
||||||
\ }])
|
\ }])
|
||||||
endif
|
endif
|
||||||
elseif g:spacevim_autocomplete_method ==# 'asyncomplete'
|
elseif g:spacevim_autocomplete_method ==# 'asyncomplete'
|
||||||
|
Loading…
Reference in New Issue
Block a user