mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 10:31:48 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user