refactor: remove fn_bool

It's better to use vim.fn directly instead of creating minor
abstractions like fn_bool.
This commit is contained in:
dundargoc
2024-04-02 12:36:13 +02:00
committed by dundargoc
parent 7560aee595
commit 9dd112dd48
6 changed files with 48 additions and 65 deletions

View File

@@ -386,7 +386,7 @@ local path2name = function(path)
path = path:gsub('^.*/lua/', '')
-- Remove the filename (health.lua)
path = vim.fn.fnamemodify(path, ':h')
path = vim.fs.dirname(path)
-- Change slashes to dots
path = path:gsub('/', '.')
@@ -497,11 +497,4 @@ function M._check(mods, plugin_names)
vim.print('')
end
local fn_bool = function(key)
return function(...)
return vim.fn[key](...) == 1
end
end
M.executable = fn_bool('executable')
return M