diff --git a/README.md b/README.md index cd7309a..8137755 100644 --- a/README.md +++ b/README.md @@ -490,6 +490,7 @@ Any operation can be started from the UI, with a sub command or an API function: | `:Lazy clean [plugins]` | `require("lazy").clean(opts?)` | Clean plugins that are no longer needed | | `:Lazy clear` | `require("lazy").clear()` | Clear finished tasks | | `:Lazy debug` | `require("lazy").debug()` | Show debug information | +| `:Lazy health` | `require("lazy").health()` | Run `:checkhealth lazy` | | `:Lazy help` | `require("lazy").help()` | Toggle this help page | | `:Lazy home` | `require("lazy").home()` | Go back to plugin list | | `:Lazy install [plugins]` | `require("lazy").install(opts?)` | Install missing plugins | diff --git a/lua/lazy/view/commands.lua b/lua/lazy/view/commands.lua index 7a026c4..d5515b8 100644 --- a/lua/lazy/view/commands.lua +++ b/lua/lazy/view/commands.lua @@ -24,6 +24,9 @@ M.commands = { Manage.clear() View.show() end, + health = function() + vim.cmd.checkhealth("lazy") + end, home = function() View.show("home") end, diff --git a/lua/lazy/view/config.lua b/lua/lazy/view/config.lua index 1d0243a..8581eb7 100644 --- a/lua/lazy/view/config.lua +++ b/lua/lazy/view/config.lua @@ -134,6 +134,10 @@ M.commands = { plugins = true, plugins_required = true, }, + health = { + desc = "Run `:checkhealth lazy`", + id = 14, + }, } return M