From f59f144b73e79aae7a73bb86bf527e79ad86de8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Gro=C3=9F?= Date: Thu, 13 Jun 2024 22:26:48 +0200 Subject: [PATCH] Port away from deprecated health API --- lua/tpipeline/health.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lua/tpipeline/health.lua b/lua/tpipeline/health.lua index 74b7c6e..f71402d 100644 --- a/lua/tpipeline/health.lua +++ b/lua/tpipeline/health.lua @@ -1,32 +1,32 @@ local M = {} M.check = function() - vim.health.report_start("tpipeline report") + vim.health.start("tpipeline report") local info = vim.fn['tpipeline#debug#info']() local ver = vim.version() if vim.version.lt(ver, {0, 6, 0}) then - vim.health.report_error(string.format("Neovim version %d.%d is not supported, use 0.6 or higher", ver.major, ver.minor)) + vim.health.error(string.format("Neovim version %d.%d is not supported, use 0.6 or higher", ver.major, ver.minor)) else - vim.health.report_ok("Neovim version is supported") + vim.health.ok("Neovim version is supported") end if vim.regex('^run'):match_str(info.job_state) == nil then - vim.health.report_error(string.format("Background job is not running: %s", info.job_state)) + vim.health.error(string.format("Background job is not running: %s", info.job_state)) else - vim.health.report_ok("Background job is running") + vim.health.ok("Background job is running") end if next(info.job_errors) == nil then - vim.health.report_ok("No job errors reported") + vim.health.ok("No job errors reported") else - vim.health.report_warn("Job reported errors", info.job_errors) + vim.health.warn("Job reported errors", info.job_errors) end if info.bad_colors > 0 then - 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)) + 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)) else - vim.health.report_ok("Colorscheme has true color support") + vim.health.ok("Colorscheme has true color support") end end