refactor(checkhealth)!: rename to vim.health, move logic to Lua #18720

- 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.
This commit is contained in:
Javier Lopez
2022-05-31 13:10:18 -05:00
committed by GitHub
parent 7380ebfc17
commit e6652821bd
8 changed files with 89 additions and 116 deletions

View File

@@ -1,10 +1,9 @@
local M = {}
local health = require("health")
M.check = function()
health.report_start("report 1")
health.report_ok("everything is fine")
health.report_warn("About to add a number to nil")
vim.health.report_start("report 1")
vim.health.report_ok("everything is fine")
vim.health.report_warn("About to add a number to nil")
local a = nil + 2
return a
end