aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/health.lua
diff options
context:
space:
mode:
authorJavier Lopez <graulopezjavier@gmail.com>2022-06-01 09:10:10 -0500
committerGitHub <noreply@github.com>2022-06-01 07:10:10 -0700
commitd837b6d50cbb7e90ac8f77a9e1ac2a69acae02c1 (patch)
tree5a5b6c0b19b86b30f51e114575f5ec011c8be4f7 /runtime/lua/vim/health.lua
parent96c494dec345f9a3dd2676048292267552e3f5f8 (diff)
downloadrneovim-d837b6d50cbb7e90ac8f77a9e1ac2a69acae02c1.tar.gz
rneovim-d837b6d50cbb7e90ac8f77a9e1ac2a69acae02c1.tar.bz2
rneovim-d837b6d50cbb7e90ac8f77a9e1ac2a69acae02c1.zip
fix(checkhealth): skip vim.health #18816
Problem: https://github.com/neovim/neovim/pull/18720#issuecomment-1142614996 The vim.health module is detected as a healthcheck, which produces spurious errors: vim: require("vim.health").check() ======================================================================== - ERROR: Failed to run healthcheck for "vim" plugin. Exception: function health#check, line 20 Vim(eval):E5108: Error executing lua [string "luaeval()"]:1: attempt to call field 'check' (a nil value) stack traceback: [string "luaeval()"]:1: in main chunk Solution: Skip vim.health when discovering healthchecks.
Diffstat (limited to 'runtime/lua/vim/health.lua')
-rw-r--r--runtime/lua/vim/health.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/lua/vim/health.lua b/runtime/lua/vim/health.lua
index 67c5c3b37f..b875da0abc 100644
--- a/runtime/lua/vim/health.lua
+++ b/runtime/lua/vim/health.lua
@@ -41,6 +41,8 @@ M._complete = function()
vim.tbl_map(function(f)
unique[f] = true
end, names)
+ -- vim.health is this file, which is not a healthcheck
+ unique['vim'] = nil
return vim.tbl_keys(unique)
end