2023-04-15 14:40:48 -07:00
|
|
|
function! s:deprecate(type) abort
|
|
|
|
let deprecate = v:lua.vim.deprecate('health#report_' . a:type, 'vim.health.' . a:type, '0.11')
|
|
|
|
redraw | echo 'Running healthchecks...'
|
2023-04-16 03:26:13 -07:00
|
|
|
if deprecate isnot v:null
|
|
|
|
call v:lua.vim.health.warn(deprecate)
|
|
|
|
endif
|
2016-06-13 11:56:16 -07:00
|
|
|
endfunction
|
|
|
|
|
2016-08-20 16:37:18 -07:00
|
|
|
function! health#report_start(name) abort
|
2023-04-15 14:40:48 -07:00
|
|
|
call v:lua.vim.health.start(a:name)
|
|
|
|
call s:deprecate('start')
|
2016-08-20 16:37:18 -07:00
|
|
|
endfunction
|
2016-06-16 14:01:47 -07:00
|
|
|
|
2023-04-15 14:40:48 -07:00
|
|
|
function! health#report_info(msg) abort
|
|
|
|
call v:lua.vim.health.info(a:msg)
|
|
|
|
call s:deprecate('info')
|
2016-08-07 11:16:30 -07:00
|
|
|
endfunction
|
|
|
|
|
2023-04-15 14:40:48 -07:00
|
|
|
function! health#report_ok(msg) abort
|
|
|
|
call v:lua.vim.health.ok(a:msg)
|
|
|
|
call s:deprecate('ok')
|
2016-11-04 03:03:05 -07:00
|
|
|
endfunction
|
|
|
|
|
2023-04-15 14:40:48 -07:00
|
|
|
function! health#report_warn(msg, ...) abort
|
2016-08-07 11:16:30 -07:00
|
|
|
if a:0 > 0
|
2023-04-15 14:40:48 -07:00
|
|
|
call v:lua.vim.health.warn(a:msg, a:1)
|
2016-06-16 14:01:47 -07:00
|
|
|
else
|
2023-04-15 14:40:48 -07:00
|
|
|
call v:lua.vim.health.warn(a:msg)
|
2016-06-13 11:56:16 -07:00
|
|
|
endif
|
2023-04-15 14:40:48 -07:00
|
|
|
call s:deprecate('warn')
|
|
|
|
endfunction
|
2016-06-13 11:56:16 -07:00
|
|
|
|
2023-04-15 14:40:48 -07:00
|
|
|
function! health#report_error(msg, ...) abort
|
2016-08-07 11:16:30 -07:00
|
|
|
if a:0 > 0
|
2023-04-15 14:40:48 -07:00
|
|
|
call v:lua.vim.health.error(a:msg, a:1)
|
2016-06-16 14:01:47 -07:00
|
|
|
else
|
2023-04-15 14:40:48 -07:00
|
|
|
call v:lua.vim.health.error(a:msg)
|
2016-06-13 11:56:16 -07:00
|
|
|
endif
|
2023-04-15 14:40:48 -07:00
|
|
|
call s:deprecate('error')
|
2016-08-20 16:37:18 -07:00
|
|
|
endfunction
|