diff --git a/lua/lazyvim/health.lua b/lua/lazyvim/health.lua index 7ea8fef7..aca7fa7e 100644 --- a/lua/lazyvim/health.lua +++ b/lua/lazyvim/health.lua @@ -9,11 +9,23 @@ function M.check() 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)) + for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit" }) do + local name = type(cmd) == "string" and cmd or vim.inspect(cmd) + local commands = type(cmd) == "string" and { cmd } or cmd + ---@cast commands string[] + local found = false + + for _, c in ipairs(commands) do + if vim.fn.executable(c) == 1 then + name = c + found = true + end + end + + if found then + vim.health.report_ok(("`%s` is installed"):format(name)) else - vim.health.report_warn(("`%s` is not installed"):format(cmd)) + vim.health.report_warn(("`%s` is not installed"):format(name)) end end end