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

perf(lazy): lazy load plugins

This commit is contained in:
Eric Wong 2024-07-07 10:10:12 +08:00
parent 8cda9e8b72
commit c1acb0a4b1
3 changed files with 5 additions and 4 deletions

View File

@ -227,6 +227,7 @@ function! SpaceVim#layers#core#plugins() abort
call add(plugins, [g:_spacevim_root_dir . 'bundle/nerdcommenter', { 'loadconf' : 1, 'merged' : 0, 'on_map' : ['<Plug>NERDCommenter', '<Plug>Commenter']}])
if exists('*matchaddpos')
let g:loaded_matchit = 1
call add(plugins, [g:_spacevim_root_dir . 'bundle/vim-matchup', {'merged' : 0, 'on_event' : 'BufReadPost'}])
endif
call add(plugins, [g:_spacevim_root_dir . 'bundle/gruvbox', {'loadconf' : 1, 'merged' : 0}])

View File

@ -100,7 +100,7 @@ endfunction
function! SpaceVim#layers#edit#plugins() abort
let plugins = [
\ [g:_spacevim_root_dir . 'bundle/vim-repeat'],
\ [g:_spacevim_root_dir . 'bundle/vim-emoji'],
\ [g:_spacevim_root_dir . 'bundle/vim-emoji', {'on_event' : 'BufReadPost'}],
\ [g:_spacevim_root_dir . 'bundle/vim-grammarous', {'merged' : 0, 'on_cmd' : ['GrammarousCheck', 'GrammarousReset']}],
\ [g:_spacevim_root_dir . 'bundle/vim-expand-region', { 'loadconf' : 1}],
\ [g:_spacevim_root_dir . 'bundle/vim-textobj-user'],

View File

@ -79,9 +79,9 @@ let s:NVIM_VERSION = SpaceVim#api#import('neovim#version')
function! SpaceVim#layers#ui#plugins() abort
let plugins = [
\ [g:_spacevim_root_dir . 'bundle/vim-cursorword', {'merged' : 0}],
\ [g:_spacevim_root_dir . 'bundle/vim-cursorword', {'merged' : 0, 'on_event' : ['CursorMoved', 'CursorMovedI']}],
\ [g:_spacevim_root_dir . 'bundle/tagbar',
\ {'loadconf' : 1, 'merged' : 0}],
\ {'loadconf' : 1, 'merged' : 0, 'on_cmd' : ['TagbarToggle', 'Tagbar']}],
\ [g:_spacevim_root_dir . 'bundle/tagbar-makefile.vim',
\ {'merged': 0}],
\ [g:_spacevim_root_dir . 'bundle/tagbar-proto.vim', {'merged': 0}],
@ -101,7 +101,7 @@ function! SpaceVim#layers#ui#plugins() abort
if (has('nvim-0.5.0') && s:NVIM_VERSION.is_release_version())
\ || has('nvim-0.6.0')
call add(plugins, [g:_spacevim_root_dir . 'bundle/indent-blankline.nvim',
\ { 'merged' : 0}])
\ { 'merged' : 0, 'on_event' : ['BufReadPost']}])
else
call add(plugins, [g:_spacevim_root_dir . 'bundle/indentLine',
\ { 'merged' : 0}])