mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 01:00:05 +08:00
Add health check
This commit is contained in:
parent
16c2a46ab5
commit
b84796485f
18
autoload/SpaceVim/health.vim
Normal file
18
autoload/SpaceVim/health.vim
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
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
|
0
autoload/SpaceVim/health/clipboard.vim
Normal file
0
autoload/SpaceVim/health/clipboard.vim
Normal file
0
autoload/SpaceVim/health/lua.vim
Normal file
0
autoload/SpaceVim/health/lua.vim
Normal file
0
autoload/SpaceVim/health/python.vim
Normal file
0
autoload/SpaceVim/health/python.vim
Normal file
Loading…
Reference in New Issue
Block a user