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 82ca2c5 commit 631d976
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions autoload/health/defx.vim
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

function! s:check_required_python_for_defx() 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 defx#init#_python_version_check()
call health#report_error('Python 3.6.1+ was successful')
call s:report_error('Python 3.6.1+ was successful')
else
call health#report_ok('Python 3.6.1+ was successful')
call s:report_ok('Python 3.6.1+ was successful')
endif
endfunction

Expand All @@ -23,3 +23,19 @@ function! health#defx#check() abort

call s:check_required_python_for_defx()
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 631d976

Please sign in to comment.