Skip to content

Commit f59f144

Browse files
committed
Port away from deprecated health API
1 parent 5dd3832 commit f59f144

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lua/tpipeline/health.lua

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
local M = {}
22

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

77
local ver = vim.version()
88
if vim.version.lt(ver, {0, 6, 0}) then
9-
vim.health.report_error(string.format("Neovim version %d.%d is not supported, use 0.6 or higher", ver.major, ver.minor))
9+
vim.health.error(string.format("Neovim version %d.%d is not supported, use 0.6 or higher", ver.major, ver.minor))
1010
else
11-
vim.health.report_ok("Neovim version is supported")
11+
vim.health.ok("Neovim version is supported")
1212
end
1313

1414
if vim.regex('^run'):match_str(info.job_state) == nil then
15-
vim.health.report_error(string.format("Background job is not running: %s", info.job_state))
15+
vim.health.error(string.format("Background job is not running: %s", info.job_state))
1616
else
17-
vim.health.report_ok("Background job is running")
17+
vim.health.ok("Background job is running")
1818
end
1919

2020
if next(info.job_errors) == nil then
21-
vim.health.report_ok("No job errors reported")
21+
vim.health.ok("No job errors reported")
2222
else
23-
vim.health.report_warn("Job reported errors", info.job_errors)
23+
vim.health.warn("Job reported errors", info.job_errors)
2424
end
2525

2626
if info.bad_colors > 0 then
27-
vim.health.report_warn(string.format("The current colorscheme contains %d highlight groups that don't properly support truecolor.\nThese colors might not render correctly in tmux.\nYou can list them with \":echom tpipeline#debug#get_bad_hl_groups()\".", info.bad_colors))
27+
vim.health.warn(string.format("The current colorscheme contains %d highlight groups that don't properly support truecolor.\nThese colors might not render correctly in tmux.\nYou can list them with \":echom tpipeline#debug#get_bad_hl_groups()\".", info.bad_colors))
2828
else
29-
vim.health.report_ok("Colorscheme has true color support")
29+
vim.health.ok("Colorscheme has true color support")
3030
end
3131
end
3232

0 commit comments

Comments
 (0)