health.lua 501 B

123456789101112131415161718192021
  1. local M = {}
  2. local report_ok = vim.fn['health#report_ok']
  3. local report_error = vim.fn['health#report_error']
  4. local function check_runtime_file(name)
  5. local path = vim.env.VIMRUNTIME .. '/' .. name
  6. if vim.loop.fs_stat(path) then
  7. report_error(string.format('%s detected. Please delete %s', name, path))
  8. else
  9. report_ok(string.format('%s not in $VIMRUNTIME', name))
  10. end
  11. end
  12. function M.check()
  13. check_runtime_file('plugin/man.vim')
  14. check_runtime_file('autoload/man.vim')
  15. end
  16. return M