|
1 | 1 | local M = {}
|
2 | 2 |
|
3 | 3 | M.check = function()
|
4 |
| - vim.health.report_start("tpipeline report") |
| 4 | + vim.health.start("tpipeline report") |
5 | 5 | local info = vim.fn['tpipeline#debug#info']()
|
6 | 6 |
|
7 | 7 | local ver = vim.version()
|
8 | 8 | 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)) |
10 | 10 | else
|
11 |
| - vim.health.report_ok("Neovim version is supported") |
| 11 | + vim.health.ok("Neovim version is supported") |
12 | 12 | end
|
13 | 13 |
|
14 | 14 | 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)) |
16 | 16 | else
|
17 |
| - vim.health.report_ok("Background job is running") |
| 17 | + vim.health.ok("Background job is running") |
18 | 18 | end
|
19 | 19 |
|
20 | 20 | if next(info.job_errors) == nil then
|
21 |
| - vim.health.report_ok("No job errors reported") |
| 21 | + vim.health.ok("No job errors reported") |
22 | 22 | else
|
23 |
| - vim.health.report_warn("Job reported errors", info.job_errors) |
| 23 | + vim.health.warn("Job reported errors", info.job_errors) |
24 | 24 | end
|
25 | 25 |
|
26 | 26 | 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)) |
28 | 28 | else
|
29 |
| - vim.health.report_ok("Colorscheme has true color support") |
| 29 | + vim.health.ok("Colorscheme has true color support") |
30 | 30 | end
|
31 | 31 | end
|
32 | 32 |
|
|
0 commit comments