Skip to content

Commit

Permalink
feat(commands): added health command to run :checkhealth lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 30, 2022
1 parent 716b6cc commit 86dff1b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
3 changes: 3 additions & 0 deletions lua/lazy/view/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ M.commands = {
Manage.clear()
View.show()
end,
health = function()
vim.cmd.checkhealth("lazy")
end,
home = function()
View.show("home")
end,
Expand Down
4 changes: 4 additions & 0 deletions lua/lazy/view/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ M.commands = {
plugins = true,
plugins_required = true,
},
health = {
desc = "Run `:checkhealth lazy`",
id = 14,
},
}

return M

0 comments on commit 86dff1b

Please sign in to comment.