feat: implement health checks

This commit is contained in:
Stevan Freeborn
2026-07-04 11:05:50 -05:00
parent 56bf4b7d11
commit 65dff6cca7
8 changed files with 197 additions and 14 deletions
+24
View File
@@ -0,0 +1,24 @@
local M = {}
function M.check()
if vim.fn.has("nvim-0.10") == 0 then
vim.health.error("Neovim 0.10 or higher is required", { "Please upgrade your Neovim installation to v0.10+" })
return
end
vim.health.start("watchexec.nvim diagnostics")
vim.health.ok("Neovim 0.10+ is installed")
local bin_path = "watchexec"
if vim.fn.executable(bin_path) == 1 then
vim.health.ok(string.format("Binary '%s' is installed and executable", bin_path))
else
vim.health.error(string.format("Binary '%s' was not found in PATH", bin_path), {
"Install watchexec",
"Or verify your plugin configuration if using a custom binary path.",
})
end
end
return M
+1 -1
View File
@@ -1,7 +1,7 @@
local M = {}
M.config = {
greeting = "Hello from my plugin"
greeting = "Hello from my plugin",
}
function M.setup(opts)