mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
feat(checkhealth): add shims for health functions (#23241)
This is for plugins wanting to support many versions of neovim.
This commit is contained in:
@@ -20,6 +20,22 @@ function M.report_error(msg, ...)
|
|||||||
vim.fn['health#report_error'](msg, ...)
|
vim.fn['health#report_error'](msg, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M.start(msg)
|
||||||
|
M.report_start(msg)
|
||||||
|
end
|
||||||
|
function M.info(msg)
|
||||||
|
M.report_info(msg)
|
||||||
|
end
|
||||||
|
function M.ok(msg)
|
||||||
|
M.report_ok(msg)
|
||||||
|
end
|
||||||
|
function M.warn(msg, ...)
|
||||||
|
M.report_warn(msg, ...)
|
||||||
|
end
|
||||||
|
function M.error(msg, ...)
|
||||||
|
M.report_error(msg, ...)
|
||||||
|
end
|
||||||
|
|
||||||
local path2name = function(path)
|
local path2name = function(path)
|
||||||
if path:match('%.lua$') then
|
if path:match('%.lua$') then
|
||||||
-- Lua: transform "../lua/vim/lsp/health.lua" into "vim.lsp"
|
-- Lua: transform "../lua/vim/lsp/health.lua" into "vim.lsp"
|
||||||
|
Reference in New Issue
Block a user