refactor: deprecate checkhealth functions

The following functions are deprecated and will be removed in
Nvim v0.11:

- health#report_start()
- health#report_info()
- health#report_ok()
- health#report_warn()
- health#report_error()
- vim.health.report_start()
- vim.health.report_info()
- vim.health.report_ok()
- vim.health.report_warn()
- vim.health.report_error()

Users should instead use these:

- vim.health.start()
- vim.health.info()
- vim.health.ok()
- vim.health.warn()
- vim.health.error()
This commit is contained in:
dundargoc
2023-04-15 23:40:48 +02:00
committed by GitHub
parent c8667c8756
commit c08b030761
22 changed files with 418 additions and 442 deletions

View File

@@ -2,8 +2,8 @@ local M = {}
--- Performs a healthcheck for LSP
function M.check()
local report_info = vim.health.report_info
local report_warn = vim.health.report_warn
local report_info = vim.health.info
local report_warn = vim.health.warn
local log = require('vim.lsp.log')
local current_log_level = log.get_level()
@@ -29,7 +29,7 @@ function M.check()
report_fn(string.format('Log size: %d KB', log_size / 1000))
local clients = vim.lsp.get_active_clients()
vim.health.report_start('vim.lsp: Active Clients')
vim.health.start('vim.lsp: Active Clients')
if next(clients) then
for _, client in pairs(clients) do
report_info(