chore: update healthcheck for new API
This commit is contained in:
1 file changed
+11
-27
+11
-27
@@ -1,33 +1,17 @@
|
|||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
|
||||||
M._check = function()
|
|
||||||
vim.health.start("zellij-nav.nvim")
|
|
||||||
local version = vim.fn.system("zellij --version")
|
|
||||||
if vim.v.shell_error ~= 0 then
|
|
||||||
vim.health.error("zellij executable not found in user's path")
|
|
||||||
else
|
|
||||||
vim.health.ok("found zellij version " .. string.gsub(version, "zellij ", ""))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
M.deprecated_check = function()
|
|
||||||
vim.health.report_start("zellij-nav.nvim")
|
|
||||||
local version = vim.fn.system("zellij --version")
|
|
||||||
if vim.v.shell_error ~= 0 then
|
|
||||||
vim.health.report_error("zellij executable not found in user's path")
|
|
||||||
else
|
|
||||||
vim.health.report_ok("found zellij version " .. string.gsub(version, "zellij ", ""))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
M.check = function()
|
M.check = function()
|
||||||
local vim_version = vim.version()
|
local start = vim.health.report_start or vim.health.start
|
||||||
if vim_version.minor > 10 then
|
local report_ok = vim.health.report_ok or vim.health.ok
|
||||||
M._check()
|
local report_error = vim.health.report_error or vim.health.error
|
||||||
else
|
|
||||||
M.deprecated_check()
|
start("zellij-nav.nvim")
|
||||||
end
|
local version = vim.fn.system("zellij --version")
|
||||||
|
if vim.v.shell_error ~= 0 then
|
||||||
|
report_error("zellij executable not found in user's path")
|
||||||
|
else
|
||||||
|
report_ok("found zellij version " .. string.gsub(version, "zellij ", ""))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
Reference in new issue
Block a user