diff --git a/autoload/SpaceVim/autocmds.vim b/autoload/SpaceVim/autocmds.vim index dedc1a504..b8b43e422 100644 --- a/autoload/SpaceVim/autocmds.vim +++ b/autoload/SpaceVim/autocmds.vim @@ -171,12 +171,25 @@ function! SpaceVim#autocmds#VimEnter() abort if !empty(get(g:, '_spacevim_bootstrap_after', '')) try call call(g:_spacevim_bootstrap_after, []) + let g:_spacevim_bootstrap_after_success = 1 catch call SpaceVim#logger#error('failed to call bootstrap_after function: ' . g:_spacevim_bootstrap_after) call SpaceVim#logger#error(' exception: ' . v:exception) call SpaceVim#logger#error(' throwpoint: ' . v:throwpoint) + let g:_spacevim_bootstrap_after_success = 0 endtry endif + + if !get(g:, '_spacevim_bootstrap_before_success', 1) + echohl Error + echom 'bootstrap_before function failed to execute. Check `SPC h L` for errors.' + echohl None + endif + if !get(g:, '_spacevim_bootstrap_after_success', 1) + echohl Error + echom 'bootstrap_after function failed to execute. Check `SPC h L` for errors.' + echohl None + endif endfunction function! s:disable_welcome() abort diff --git a/autoload/SpaceVim/custom.vim b/autoload/SpaceVim/custom.vim index d2cb4b0d6..920995663 100644 --- a/autoload/SpaceVim/custom.vim +++ b/autoload/SpaceVim/custom.vim @@ -160,10 +160,12 @@ function! SpaceVim#custom#apply(config, type) abort if !empty(bootstrap_before) try call call(bootstrap_before, []) + let g:_spacevim_bootstrap_before_success = 1 catch call SpaceVim#logger#error('failed to call bootstrap_before function: ' . bootstrap_before) call SpaceVim#logger#error(' exception: ' . v:exception) call SpaceVim#logger#error(' throwpoint: ' . v:throwpoint) + let g:_spacevim_bootstrap_before_success = 0 endtry endif endif