mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:00:04 +08:00
Make some plugins lazyload (#4230)
This commit is contained in:
parent
2dd0f66ec1
commit
8d5931f642
@ -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
|
||||
|
@ -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')
|
||||
|
@ -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'}])
|
||||
|
@ -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')
|
||||
|
@ -32,6 +32,8 @@ function! SpaceVim#layers#tools#plugins() abort
|
||||
\ 'BookmarkAnnotate',
|
||||
\ 'BookmarkNext',
|
||||
\ 'BookmarkPrev',
|
||||
\ 'BookmarkClear',
|
||||
\ 'BookmarkClearAll'
|
||||
\ ],
|
||||
\ 'loadconf_before' : 1}])
|
||||
if s:CMP.has('python')
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user