Skip to content

Commit

Permalink
feat(checkhealth): backward compat for <= 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
creativenull committed Dec 6, 2021
1 parent e01dfad commit b8fbbe6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions autoload/health/diagnosticls_configs.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
if has('nvim') && has('nvim-0.5')
function! s:has_issues() abort
let l:dls_issues = luaeval('_G.diagnosticls_healthcheck')
return !empty(l:dls_issues)
endfunction

function! health#diagnosticls_configs#check() abort
if s:has_issues()
let l:dls_issues = luaeval('_G.diagnosticls_healthcheck')
for l:issue in l:dls_issues
call health#report_error(issue)
endfor
else
call health#report_ok('All checks passed')
endif
endfunction
endif

0 comments on commit b8fbbe6

Please sign in to comment.