1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 18:50:03 +08:00
SpaceVim/autoload/SpaceVim/health.vim
2017-03-06 23:26:26 +08:00

21 lines
591 B
VimL

function! SpaceVim#health#report() abort
let items = map(SpaceVim#util#globpath(&rtp,'autoload/SpaceVim/health/*'), "fnamemodify(v:val,':t:r')")
let report = []
for item in items
try
let result = SpaceVim#health#{item}#check()
call extend(report,result)
catch /^Vim\%((\a\+)\)\=:E117/
call extend(report,[
\ '',
\ 'SpaceVim Health Error:',
\ ' There is no function: SpaceVim#health#' . item . '#check()',
\ '',
\ ])
endtry
endfor
return join(report, "\n")
endfunction
" vim:set et sw=2: