Skip to content

Commit

Permalink
Fix for the latest neovim
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Apr 22, 2023
1 parent 661d68b commit 54eebec
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions autoload/health/denite.vim
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@

function! s:check_required_python() abort
if has('python3')
call health#report_ok('has("python3") was successful')
call s:report_ok('has("python3") was successful')
else
call health#report_error('has("python3") was not successful')
call s:report_error('has("python3") was not successful')
endif

if !denite#init#_python_version_check()
call health#report_ok('Python 3.6.1+ was successful')
call s:report_ok('Python 3.6.1+ was successful')
else
call health#report_error(
call s:report_error(
\ 'Python 3.6.1+ was not successful',
\ 'Please use Python 3.6.1+.')
endif
endfunction

function! s:check_required_msgpack() abort
if !denite#init#_msgpack_version_check()
call health#report_ok('Require msgpack 1.0.0+ was successful')
call s:report_ok('Require msgpack 1.0.0+ was successful')
else
call health#report_error(
call s:report_error(
\ 'Require msgpack 1.0.0+ was not successful',
\ 'Please install/upgrade msgpack 1.0.0+.')
endif
Expand All @@ -36,3 +36,19 @@ function! health#denite#check() abort
call s:check_required_python()
call s:check_required_msgpack()
endfunction

function! s:report_ok(report) abort
if has('nvim-0.10')
call v:lua.vim.health.ok(a:report)
else
call health#report_ok(a:report)
endif
endfunction

function! s:report_error(report) abort
if has('nvim-0.10')
call v:lua.vim.health.error(a:report)
else
call health#report_error(a:report)
endif
endfunction

0 comments on commit 54eebec

Please sign in to comment.