From f03ddc3daef6cb6ec06cbf68ce5d5581f5e9ff57 Mon Sep 17 00:00:00 2001 From: Prabir Shrestha Date: Fri, 19 Jul 2024 22:53:02 -0700 Subject: [PATCH] =?UTF-8?q?Revert=20"Switch=20to=20the=20new=20Neovim=20he?= =?UTF-8?q?alth=20API,=20since=20the=20old=20report=5Fhealth=20func?= =?UTF-8?q?=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit f160fe2719eef7644a8c5d6ea21292434bb8a68a. --- autoload/health/lsp.vim | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/autoload/health/lsp.vim b/autoload/health/lsp.vim index 0b3529ba7..782da42fa 100644 --- a/autoload/health/lsp.vim +++ b/autoload/health/lsp.vim @@ -8,7 +8,7 @@ endf function! health#lsp#check() abort - call v:lua.vim.health.start('server status') + call health#report_start('server status') let l:server_status = lsp#collect_server_status() let l:has_printed = v:false @@ -17,21 +17,21 @@ function! health#lsp#check() abort let l:status_msg = printf('%s: %s', l:k, l:report.status) if l:report.status == 'running' - call v:lua.vim.health.ok(l:status_msg) + call health#report_ok(l:status_msg) elseif l:report.status == 'failed' - call v:lua.vim.health.error(l:status_msg, 'See :help g:lsp_log_verbose to debug server failure.') + call health#report_error(l:status_msg, 'See :help g:lsp_log_verbose to debug server failure.') else - call v:lua.vim.health.warn(l:status_msg) + call health#report_warn(l:status_msg) endif let l:has_printed = v:true endfor if !l:has_printed - call v:lua.vim.health.warn('no servers connected') + call health#report_warn('no servers connected') endif for l:k in sort(keys(l:server_status)) - call v:lua.vim.health.start(printf('server configuration: %s', l:k)) + call health#report_start(printf('server configuration: %s', l:k)) let l:report = l:server_status[l:k] let l:msg = "\t\n" @@ -51,14 +51,14 @@ function! health#lsp#check() abort endif let l:msg .= printf("### workspace_config\n```json\n%s\n```", l:cfg) endif - call v:lua.vim.health.info(l:msg) + call health#report_info(l:msg) endfor - call v:lua.vim.health.start('Performance') + call health#report_start('Performance') if lsp#utils#has_lua() && g:lsp_use_lua - call v:lua.vim.health.ok('Using lua for faster performance.') + call health#report_ok('Using lua for faster performance.') else - call v:lua.vim.health.warn('Missing requirements to enable lua for faster performance.') + call health#report_warn('Missing requirements to enable lua for faster performance.') endif endf