Skip to content

Commit

Permalink
feat(health): added some simple health checks
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jan 24, 2023
1 parent b81dc71 commit adee052
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lua/lazyvim/health.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
local M = {}

function M.check()
vim.health.report_start("LazyVim")

if vim.fn.has("nvim-0.8.0") == 1 then
vim.health.report_ok("Using Neovim >= 0.8.0")
else
vim.health.report_error("Neovim >= 0.8.0 is required")
end

for _, cmd in ipairs({ "git", "rg", "fd", "lazygit" }) do
if vim.fn.executable(cmd) == 1 then
vim.health.report_ok(("`%s` is installed"):format(cmd))
else
vim.health.report_warn(("`%s` is not installed"):format(cmd))
end
end
end

return M

0 comments on commit adee052

Please sign in to comment.