feat: add health checker

This commit is contained in:
Smirnov Olexander 2022-06-06 23:53:50 +03:00
parent 8bb8c14e8b
commit f507a37a72
3 changed files with 55 additions and 0 deletions

View file

@ -19,4 +19,21 @@ return {
return s:sub(1, n)
end,
---@param lib string
---@return boolean
lualib_is_found = function(lib)
local is_found, _ = pcall(require, lib)
return is_found
end,
---@param bin string
---@return boolean
binary_is_found = function(bin)
if vim.fn.executable(bin) == 1 then
return true
end
return false
end,
}