From cb9b5bca63faaa5ced9be5e88426474eaa16b207 Mon Sep 17 00:00:00 2001 From: "D. Fender" <26173007+postfen@users.noreply.github.com> Date: Thu, 16 Mar 2023 10:23:36 -0600 Subject: [PATCH 1/3] Fix :checkhealth to call vim.health Changed health check function to function appropriately, modelled after documentation here: https://neovim.io/doc/user/pi_health.html#health-dev. --- lua/clipboard-image/health.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/clipboard-image/health.lua b/lua/clipboard-image/health.lua index 51fb558..6cda3c5 100644 --- a/lua/clipboard-image/health.lua +++ b/lua/clipboard-image/health.lua @@ -1,6 +1,5 @@ local M = {} local utils = require "clipboard-image.utils" -local health = require "health" local packages = { x11 = { name = "xclip", binary = "xclip" }, @@ -50,9 +49,9 @@ M.check = function() health.report_start "Checking dependencies" if is_dep_exist then - health.report_ok(report_msg) + vim.health.report_ok(report_msg) else - health.report_error(report_msg) + vim.health.report_error(report_msg) end end From 9c4598040edf3df568a3fa14e690344116439daf Mon Sep 17 00:00:00 2001 From: "D. Fender" <26173007+postfen@users.noreply.github.com> Date: Fri, 7 Apr 2023 14:50:55 -0600 Subject: [PATCH 2/3] Update health.lua --- lua/clipboard-image/health.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/clipboard-image/health.lua b/lua/clipboard-image/health.lua index 6cda3c5..44e42c3 100644 --- a/lua/clipboard-image/health.lua +++ b/lua/clipboard-image/health.lua @@ -47,7 +47,7 @@ end M.check = function() local is_dep_exist, report_msg = M.check_current_dep() - health.report_start "Checking dependencies" + vim.health.report_start "Checking dependencies" if is_dep_exist then vim.health.report_ok(report_msg) else From 206cbe50c004f57368498ce8e850d890557ece77 Mon Sep 17 00:00:00 2001 From: "D. Fender" <26173007+postfen@users.noreply.github.com> Date: Tue, 23 May 2023 09:47:05 -0600 Subject: [PATCH 3/3] Moved from depcrecated functions --- lua/clipboard-image/health.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/clipboard-image/health.lua b/lua/clipboard-image/health.lua index 44e42c3..281a79e 100644 --- a/lua/clipboard-image/health.lua +++ b/lua/clipboard-image/health.lua @@ -47,11 +47,11 @@ end M.check = function() local is_dep_exist, report_msg = M.check_current_dep() - vim.health.report_start "Checking dependencies" + vim.health.start("Checking dependencies") if is_dep_exist then - vim.health.report_ok(report_msg) + vim.health.ok(report_msg) else - vim.health.report_error(report_msg) + vim.health.error(report_msg) end end