mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
feat(man): add health check
Fixes #20432
(cherry picked from commit 4ccc57fd7a
)
This commit is contained in:
parent
0f669b7b70
commit
62e3ca3e2b
20
runtime/lua/man/health.lua
Normal file
20
runtime/lua/man/health.lua
Normal file
@ -0,0 +1,20 @@
|
||||
local M = {}
|
||||
|
||||
local report_ok = vim.fn['health#report_ok']
|
||||
local report_error = vim.fn['health#report_error']
|
||||
|
||||
local function check_runtime_file(name)
|
||||
local path = vim.env.VIMRUNTIME .. '/' .. name
|
||||
if vim.loop.fs_stat(path) then
|
||||
report_error(string.format('%s detected. Please delete %s', name, path))
|
||||
else
|
||||
report_ok(string.format('%s not in $VIMRUNTIME', name))
|
||||
end
|
||||
end
|
||||
|
||||
function M.check()
|
||||
check_runtime_file('plugin/man.vim')
|
||||
check_runtime_file('autoload/man.vim')
|
||||
end
|
||||
|
||||
return M
|
Loading…
Reference in New Issue
Block a user