aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/health.lua
Commit message (Collapse)AuthorAge
* refactor(health)!: remove deprecated health.luanullchilly2023-03-11
|
* refactor(checkhealth)!: rename to vim.health, move logic to Lua #18720Javier Lopez2022-05-31
| | | | | | | | | - Complete function: There was lots of unnecessary C code for the complete function, therefore moving it to Lua and use all the plumbing we have in place to retrieve the results. - Moving the module: It's important we keep nvim lua modules name spaced, avoids conflict with plugins, luarocks, etc.
* feat(runtime/health): support lua healthchecksJavier López2021-10-04
- Refactor health.vim to discover lua healthcheck in the runtime directories lua/**/health{/init}.lua - Support healthchecks for lua submodules e.g :checkhealth vim.lsp and also support wildcard "*" at the end for all submodules :checkhealth vim* - Refactor health.vim to use variable scope instead of output capturing - Create health.lua module to wrap report functions and future extensibility. - Move away from searching just in the runtimepath, use `nvim_get_runtime_file` due to #15632 Example: Plugin linter in rtp can declare it's checkhealts in lua module `lua/linter/health{/init}.lua` that returns a table with a method "check" that when executed calls the report functions provided by the builtin lua module require("health"). The plugin also has a submodule `/lua/linter/providers` in which it defines `/lua/linter/providers/health{/init}.lua` This plugin healthcheck can now be run by the ex command: `:checkhealth linter linter.providers` Also calling all submodules can be done by: `:checkhealth linter* And "linter" and "linter.provider" would be discovered when: `:checkhealth`