mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 10:00:04 +08:00
Fixed to work with vim-plug
Docs claim to support vim-plug, but I could not get it to work by default. I fixed zvim#plug#add() and s:install_manager to at least work minimally. Still unfixed is that using vim-plug does not seem to respect lazy-loading rules.
This commit is contained in:
parent
eadaf62aa6
commit
8229728e8f
@ -59,7 +59,7 @@ function! s:install_manager()
|
|||||||
elseif g:spacevim_plugin_manager == 'vim-plug'
|
elseif g:spacevim_plugin_manager == 'vim-plug'
|
||||||
"auto install vim-plug
|
"auto install vim-plug
|
||||||
if filereadable(expand('~/.cache/vim-plug/autoload/plug.vim'))
|
if filereadable(expand('~/.cache/vim-plug/autoload/plug.vim'))
|
||||||
let g:spacevim_dein_installed = 1
|
let g:spacevim_vim_plug_installed = 1
|
||||||
else
|
else
|
||||||
if executable('curl')
|
if executable('curl')
|
||||||
exec '!curl -fLo '
|
exec '!curl -fLo '
|
||||||
@ -67,7 +67,7 @@ function! s:install_manager()
|
|||||||
\ . ' --create-dirs '
|
\ . ' --create-dirs '
|
||||||
\ . 'https://raw.githubusercontent.com/'
|
\ . 'https://raw.githubusercontent.com/'
|
||||||
\ . 'junegunn/vim-plug/master/plug.vim'
|
\ . 'junegunn/vim-plug/master/plug.vim'
|
||||||
let g:spacevim_dein_installed = 1
|
let g:spacevim_vim_plug_installed = 1
|
||||||
else
|
else
|
||||||
echohl WarningMsg
|
echohl WarningMsg
|
||||||
echom "You need install curl!"
|
echom "You need install curl!"
|
||||||
@ -158,6 +158,12 @@ function! zvim#plug#add(repo,...) abort
|
|||||||
else
|
else
|
||||||
call dein#add(a:repo)
|
call dein#add(a:repo)
|
||||||
endif
|
endif
|
||||||
|
elseif g:spacevim_plugin_manager == 'vim-plug'
|
||||||
|
if len(a:000) > 0
|
||||||
|
exec "Plug '".a:repo."', ".join(a:000,',')
|
||||||
|
else
|
||||||
|
exec "Plug '".a:repo."'"
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
exec 'call add(g:unite_source_menu_menus'
|
exec 'call add(g:unite_source_menu_menus'
|
||||||
\ . '.AddedPlugins.command_candidates, ["['
|
\ . '.AddedPlugins.command_candidates, ["['
|
||||||
|
Loading…
Reference in New Issue
Block a user