Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Switch to the new Neovim health API" #1569

Merged
merged 1 commit into from
Jul 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions autoload/health/lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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
Expand Down
Loading