From df3982e704992fc33db97de8785bdbcd02c3c504 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Fri, 21 Apr 2023 13:39:03 +0200 Subject: [PATCH] feat(checkhealth): add shims for health functions (#23241) This is for plugins wanting to support many versions of neovim. --- runtime/lua/vim/health.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/runtime/lua/vim/health.lua b/runtime/lua/vim/health.lua index 044880e076..1782b0d347 100644 --- a/runtime/lua/vim/health.lua +++ b/runtime/lua/vim/health.lua @@ -20,6 +20,22 @@ function M.report_error(msg, ...) vim.fn['health#report_error'](msg, ...) end +function M.start(msg) + M.report_start(msg) +end +function M.info(msg) + M.report_info(msg) +end +function M.ok(msg) + M.report_ok(msg) +end +function M.warn(msg, ...) + M.report_warn(msg, ...) +end +function M.error(msg, ...) + M.report_error(msg, ...) +end + local path2name = function(path) if path:match('%.lua$') then -- Lua: transform "../lua/vim/lsp/health.lua" into "vim.lsp"