aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/health.lua
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2024-04-02 12:36:13 +0200
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2024-04-06 16:42:26 +0200
commit9dd112dd4821a325a6c1c8d952a537f42f9c728c (patch)
tree02d59fe023762ef90c1e93c17dd602095c5195dc /runtime/lua/vim/health.lua
parent7560aee59547c3b050c3ee9988dd0e4d36d00144 (diff)
downloadrneovim-9dd112dd4821a325a6c1c8d952a537f42f9c728c.tar.gz
rneovim-9dd112dd4821a325a6c1c8d952a537f42f9c728c.tar.bz2
rneovim-9dd112dd4821a325a6c1c8d952a537f42f9c728c.zip
refactor: remove fn_bool
It's better to use vim.fn directly instead of creating minor abstractions like fn_bool.
Diffstat (limited to 'runtime/lua/vim/health.lua')
-rw-r--r--runtime/lua/vim/health.lua9
1 files changed, 1 insertions, 8 deletions
diff --git a/runtime/lua/vim/health.lua b/runtime/lua/vim/health.lua
index f6f7abef8f..9e9c557ad3 100644
--- a/runtime/lua/vim/health.lua
+++ b/runtime/lua/vim/health.lua
@@ -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