refactor(health): keep in mind new way of health check (#63)
This commit is contained in:
parent
10cec9c6b0
commit
afb383c913
2 changed files with 13 additions and 29 deletions
|
|
@ -1,26 +0,0 @@
|
|||
local h = vim.health or require "health"
|
||||
local health = {}
|
||||
|
||||
health.start = h.start or h.report_start
|
||||
health.ok = h.ok or h.report_ok
|
||||
health.warn = h.warn or h.report_warn
|
||||
health.error = h.error or h.report_error
|
||||
health.info = h.info or h.report_info
|
||||
|
||||
---@param module string
|
||||
---@return boolean
|
||||
function health.is_lualib_found(module)
|
||||
local is_found, _ = pcall(require, module)
|
||||
return is_found
|
||||
end
|
||||
|
||||
---@param bin string
|
||||
---@return boolean
|
||||
function health.is_binary_found(bin)
|
||||
if vim.fn.executable(bin) == 1 then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
return health
|
||||
Loading…
Add table
Add a link
Reference in a new issue