1
0
Fork 0
mirror of synced 2024-11-17 22:45:34 -05:00
ultimate-vim/sources_non_forked/markdown-preview.nvim/autoload/health/mkdp.vim

20 lines
967 B
VimL
Raw Normal View History

2022-05-19 08:12:11 -04:00
let s:mkdp_root_dir = expand('<sfile>:h:h:h')
function! health#mkdp#check() abort
call health#report_info('Platform: ' . mkdp#util#get_platform())
let l:info = system('nvim --version')
call health#report_info('Nvim Version: '. split(l:info, '\n')[0])
let l:mkdp_server_script = s:mkdp_root_dir . '/app/bin/markdown-preview-' . mkdp#util#get_platform()
if executable(l:mkdp_server_script)
call health#report_info('Pre build: ' . l:mkdp_server_script)
call health#report_info('Pre build version: ' . mkdp#util#pre_build_version())
call health#report_ok('Using pre build')
elseif executable('node')
call health#report_info('Node version: ' . system('node --version'))
let l:mkdp_server_script = s:mkdp_root_dir . '/app/server.js'
call health#report_info('Script: ' . l:mkdp_server_script)
call health#report_info('Script exists: ' . filereadable(l:mkdp_server_script))
call health#report_ok('Using node')
endif
endfunction