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

Make some plugins lazyload (#4230)

This commit is contained in:
Heachen Bear 2021-05-02 21:20:03 +08:00 committed by GitHub
parent 2dd0f66ec1
commit 8d5931f642
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 5 deletions

View File

@ -133,7 +133,7 @@ function! SpaceVim#layers#checkers#config() abort
endif
endif
elseif g:spacevim_lint_engine ==# 'ale' && SpaceVim#layers#isLoaded('core#statusline')
autocmd User ALELint
autocmd User ALELintPost
\ let &l:statusline = SpaceVim#layers#core#statusline#get(1)
endif
augroup END

View File

@ -10,7 +10,7 @@
function! SpaceVim#layers#chinese#plugins() abort
let plugins = [
\ ['yianwillis/vimcdoc' , {'merged' : 0}],
\ ['voldikss/vim-translate-me' , {'merged' : 0, 'on_cmd' : ['Translate']}],
\ ['voldikss/vim-translator' , {'merged' : 0, 'on_cmd' : ['Translate', 'TranslateW', 'TranslateR', 'TranslateX']}],
\ ['wsdjeg/ChineseLinter.vim' , {'merged' : 0, 'on_cmd' : 'CheckChinese', 'on_ft' : ['markdown', 'text']}],
\ ]
if SpaceVim#layers#isLoaded('ctrlp')

View File

@ -33,7 +33,7 @@ function! SpaceVim#layers#edit#plugins() abort
\ [g:_spacevim_root_dir . 'bundle/vim-jplus', { 'on_map' : '<Plug>(jplus' }],
\ [g:_spacevim_root_dir . 'bundle/tabular', { 'merged' : 0}],
\ [g:_spacevim_root_dir . 'bundle/vim-better-whitespace', { 'on_cmd' : ['StripWhitespace', 'ToggleWhitespace', 'DisableWhitespace', 'EnableWhitespace']}],
\ ['andrewradev/splitjoin.vim',{ 'merged' : 0, 'loadconf' : 1}],
\ ['andrewradev/splitjoin.vim',{ 'on_cmd':['SplitjoinJoin', 'SplitjoinSplit'],'merged' : 0, 'loadconf' : 1}],
\ ]
if executable('fcitx')
call add(plugins,[g:_spacevim_root_dir . 'bundle/fcitx.vim', { 'on_event' : 'InsertEnter'}])

View File

@ -38,7 +38,7 @@ function! SpaceVim#layers#lang#markdown#plugins() abort
call SpaceVim#logger#error('npm or yarn is required to build iamcco/markdown-preview and neoclide/vim-node-rpc')
endif
call add(plugins, ['iamcco/markdown-preview.nvim',
\ { 'on_ft' : 'markdown',
\ { 'on_cmd' : 'MarkdownPreview',
\ 'depends': 'open-browser.vim',
\ 'build' : 'cd app & ' . s:node_pkgm . ' install' }])
if !has('nvim')

View File

@ -32,6 +32,8 @@ function! SpaceVim#layers#tools#plugins() abort
\ 'BookmarkAnnotate',
\ 'BookmarkNext',
\ 'BookmarkPrev',
\ 'BookmarkClear',
\ 'BookmarkClearAll'
\ ],
\ 'loadconf_before' : 1}])
if s:CMP.has('python')

View File

@ -22,7 +22,7 @@ function! SpaceVim#layers#ui#plugins() abort
\ [g:_spacevim_root_dir . 'bundle/tagbar', {'loadconf' : 1, 'merged' : 0}],
\ [g:_spacevim_root_dir . 'bundle/tagbar-makefile.vim', {'merged': 0}],
\ [g:_spacevim_root_dir . 'bundle/tagbar-proto.vim', {'merged': 0}],
\ [g:_spacevim_root_dir . 'bundle/vim-choosewin', {'merged' : 0}],
\ [g:_spacevim_root_dir . 'bundle/vim-choosewin', {'on_cmd' : 'ChooseWin', 'merged' : 0}],
\ [g:_spacevim_root_dir . 'bundle/vim-startify', {'loadconf' : 1, 'merged' : 0}],
\ ]
if !SpaceVim#layers#isLoaded('core#statusline')