aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2022-10-10 16:21:40 +0100
committerGitHub <noreply@github.com>2022-10-10 16:21:40 +0100
commit121f052d1fb28414e4ef910ac23e120710786afe (patch)
tree7674de648f43e46060efaf9115a22f2c96635c03
parent81058119dfa493aa7849b0ad125e9b1d79fb20b9 (diff)
parent4ccc57fd7a1445770a6cd7c85aa76a3a8928295b (diff)
downloadrneovim-121f052d1fb28414e4ef910ac23e120710786afe.tar.gz
rneovim-121f052d1fb28414e4ef910ac23e120710786afe.tar.bz2
rneovim-121f052d1fb28414e4ef910ac23e120710786afe.zip
Merge pull request #20576 from lewis6991/manhealth
-rw-r--r--runtime/lua/man/health.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/runtime/lua/man/health.lua b/runtime/lua/man/health.lua
new file mode 100644
index 0000000000..11d7148216
--- /dev/null
+++ b/runtime/lua/man/health.lua
@@ -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