feat(commands): added health command to run `:checkhealth lazy`

This commit is contained in:
Folke Lemaitre 2022-12-30 11:29:17 +01:00
parent 716b6cc2b5
commit 86dff1b59a
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
3 changed files with 8 additions and 0 deletions

View File

@ -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 clean [plugins]` | `require("lazy").clean(opts?)` | Clean plugins that are no longer needed |
| `:Lazy clear` | `require("lazy").clear()` | Clear finished tasks | | `:Lazy clear` | `require("lazy").clear()` | Clear finished tasks |
| `:Lazy debug` | `require("lazy").debug()` | Show debug information | | `: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 help` | `require("lazy").help()` | Toggle this help page |
| `:Lazy home` | `require("lazy").home()` | Go back to plugin list | | `:Lazy home` | `require("lazy").home()` | Go back to plugin list |
| `:Lazy install [plugins]` | `require("lazy").install(opts?)` | Install missing plugins | | `:Lazy install [plugins]` | `require("lazy").install(opts?)` | Install missing plugins |

View File

@ -24,6 +24,9 @@ M.commands = {
Manage.clear() Manage.clear()
View.show() View.show()
end, end,
health = function()
vim.cmd.checkhealth("lazy")
end,
home = function() home = function()
View.show("home") View.show("home")
end, end,

View File

@ -134,6 +134,10 @@ M.commands = {
plugins = true, plugins = true,
plugins_required = true, plugins_required = true,
}, },
health = {
desc = "Run `:checkhealth lazy`",
id = 14,
},
} }
return M return M