local health = vim.health local M = {} local binaries = { { bin = "promtool", optional = false }, } local binary_installed = function(binary) return vim.fn.executable(binary) end M.check = function() for _, binary in ipairs(binaries) do if not binary_installed(binary.bin) then local bin_not_installed = binary.bin .. " not found" if binary.optional then health.warn(("%s %s"):format(bin_not_installed, binary.info)) else health.error(binary.bin .. " not found") end else health.ok(binary.bin .. " found") end end end return M