Skip to content

Commit 2e03278

Browse files
Revert "Switch to the new Neovim health API, since the old report_health func…" (#1569)
This reverts commit f160fe2.
1 parent f160fe2 commit 2e03278

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

autoload/health/lsp.vim

+10-10
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ endf
88

99

1010
function! health#lsp#check() abort
11-
call v:lua.vim.health.start('server status')
11+
call health#report_start('server status')
1212
let l:server_status = lsp#collect_server_status()
1313

1414
let l:has_printed = v:false
@@ -17,21 +17,21 @@ function! health#lsp#check() abort
1717

1818
let l:status_msg = printf('%s: %s', l:k, l:report.status)
1919
if l:report.status == 'running'
20-
call v:lua.vim.health.ok(l:status_msg)
20+
call health#report_ok(l:status_msg)
2121
elseif l:report.status == 'failed'
22-
call v:lua.vim.health.error(l:status_msg, 'See :help g:lsp_log_verbose to debug server failure.')
22+
call health#report_error(l:status_msg, 'See :help g:lsp_log_verbose to debug server failure.')
2323
else
24-
call v:lua.vim.health.warn(l:status_msg)
24+
call health#report_warn(l:status_msg)
2525
endif
2626
let l:has_printed = v:true
2727
endfor
2828

2929
if !l:has_printed
30-
call v:lua.vim.health.warn('no servers connected')
30+
call health#report_warn('no servers connected')
3131
endif
3232

3333
for l:k in sort(keys(l:server_status))
34-
call v:lua.vim.health.start(printf('server configuration: %s', l:k))
34+
call health#report_start(printf('server configuration: %s', l:k))
3535
let l:report = l:server_status[l:k]
3636

3737
let l:msg = "\t\n"
@@ -51,14 +51,14 @@ function! health#lsp#check() abort
5151
endif
5252
let l:msg .= printf("### workspace_config\n```json\n%s\n```", l:cfg)
5353
endif
54-
call v:lua.vim.health.info(l:msg)
54+
call health#report_info(l:msg)
5555
endfor
5656

57-
call v:lua.vim.health.start('Performance')
57+
call health#report_start('Performance')
5858
if lsp#utils#has_lua() && g:lsp_use_lua
59-
call v:lua.vim.health.ok('Using lua for faster performance.')
59+
call health#report_ok('Using lua for faster performance.')
6060
else
61-
call v:lua.vim.health.warn('Missing requirements to enable lua for faster performance.')
61+
call health#report_warn('Missing requirements to enable lua for faster performance.')
6262
endif
6363

6464
endf

0 commit comments

Comments
 (0)