diff --git a/lua/lazyvim/health.lua b/lua/lazyvim/health.lua index aca7fa7e..810022e5 100644 --- a/lua/lazyvim/health.lua +++ b/lua/lazyvim/health.lua @@ -1,12 +1,17 @@ local M = {} +local start = vim.health.start or vim.health.report_start +local ok = vim.health.ok or vim.health.report_ok +local warn = vim.health.warn or vim.health.report_warn +local error = vim.health.error or vim.health.report_error + function M.check() - vim.health.report_start("LazyVim") + start("LazyVim") if vim.fn.has("nvim-0.8.0") == 1 then - vim.health.report_ok("Using Neovim >= 0.8.0") + ok("Using Neovim >= 0.8.0") else - vim.health.report_error("Neovim >= 0.8.0 is required") + error("Neovim >= 0.8.0 is required") end for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit" }) do @@ -23,9 +28,9 @@ function M.check() end if found then - vim.health.report_ok(("`%s` is installed"):format(name)) + ok(("`%s` is installed"):format(name)) else - vim.health.report_warn(("`%s` is not installed"):format(name)) + warn(("`%s` is not installed"):format(name)) end end end