mirror of
https://github.com/neovim/neovim.git
synced 2025-11-16 07:11:20 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user