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

perf(plugins): lazy load plugins

This commit is contained in:
Eric Wong 2024-07-03 07:38:50 +08:00
parent 305e4545ec
commit 26b7c1e45a
2 changed files with 3 additions and 2 deletions

View File

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

View File

@ -39,13 +39,14 @@ function! SpaceVim#layers#github#plugins() abort
\ [g:_spacevim_root_dir . 'bundle/vim-github-dashboard', {
\ 'merged' : 0,
\ 'if' : has('ruby'),
\ 'on_cmd' : ['GHActivity', 'GHDashboard'],
\ }],
\ ['tyru/open-browser-github.vim', {
\ 'depends': 'open-browser.vim',
\ 'on_cmd': ['OpenGithubFile', 'OpenGithubIssue', 'OpenGithubPullReq'],
\ }],
\ [g:_spacevim_root_dir . 'bundle/github.vim', {'merged' : 0}],
\ ['lambdalisue/vim-gista', {'merged' : 0}],
\ ['lambdalisue/vim-gista', {'merged' : 0, 'on_cmd' : ['Gista']}],
\ ]
endfunction