mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-31 16:14:46 +02:00
feat(health): added some simple health checks
This commit is contained in:
parent
b81dc71211
commit
adee0521bf
1 changed files with 21 additions and 0 deletions
21
lua/lazyvim/health.lua
Normal file
21
lua/lazyvim/health.lua
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue