From 97619e677cbb7bb40cd07e5448f9135f6b1b7bdc Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Mon, 26 May 2025 00:54:31 +0300 Subject: [PATCH] feat(health): add check-health --- lua/lualine-harpoon/health.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lua/lualine-harpoon/health.lua diff --git a/lua/lualine-harpoon/health.lua b/lua/lualine-harpoon/health.lua new file mode 100644 index 0000000..18d9a6f --- /dev/null +++ b/lua/lualine-harpoon/health.lua @@ -0,0 +1,28 @@ +local M = {} + +function M.check() + vim.health.start("lualine-harpoon") + + local has_lualine = pcall(require, "lualine") + if has_lualine then + vim.health.ok("lualine is installed") + else + vim.health.error("lualine is not installed") + end + + local has_harpoon = pcall(require, "harpoon") + if has_harpoon then + vim.health.ok("harpoon is installed") + else + vim.health.warn("harpoon is not installed - component will show empty") + end + + local has_plenary = pcall(require, "plenary.path") + if has_plenary then + vim.health.ok("plenary.nvim is installed (recommended)") + else + vim.health.warn("plenary.nvim is not installed - path normalization disabled") + end +end + +return M