Skip to content

Commit 36e55a0

Browse files
committed
Port away from deprecated health API
For some unnecessary reason this API got renamed for neovim 0.11. See #15
1 parent c0ab46e commit 36e55a0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lua/lumen/health.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
local M = {}
22

33
M.check = function()
4-
vim.health.report_start("lumen report")
4+
vim.health.start("lumen report")
55
local info = vim.fn['lumen#debug#info']()
66

77
if info.platform:len() then
8-
vim.health.report_ok(string.format("Platform %s is supported", info.platform))
8+
vim.health.ok(string.format("Platform %s is supported", info.platform))
99
else
10-
vim.health.report_error("Platform is not supported")
10+
vim.health.error("Platform is not supported")
1111
end
1212

1313
if vim.regex('^run'):match_str(info.job_state) == nil then
14-
vim.health.report_error(string.format("Background job is not running: %s", info.job_state))
14+
vim.health.error(string.format("Background job is not running: %s", info.job_state))
1515
else
16-
vim.health.report_ok("Background job is running")
16+
vim.health.ok("Background job is running")
1717
end
1818

1919
if next(info.job_errors) == nil then
20-
vim.health.report_ok("No job errors reported")
20+
vim.health.ok("No job errors reported")
2121
else
22-
vim.health.report_warn("Job reported errors", info.job_errors)
22+
vim.health.warn("Job reported errors", info.job_errors)
2323
end
2424
end
2525

0 commit comments

Comments
 (0)