nvimlsp: Correct deprecation warning on nvimlsp plugin (#2678)

Also correct regression introduced in #2676 with #2677
This commit is contained in:
Dionisio E Alonso 2024-05-20 08:51:17 -03:00 committed by GitHub
parent 6cc2c5c9e9
commit 16c1638f93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -15,9 +15,9 @@ function! s:airline_nvimlsp_count(cnt, symbol) abort
endfunction
function! airline#extensions#nvimlsp#get(type) abort
if has('nvim-0.11') && luaeval('vim.tbl_isempty(vim.lsp.get_clients())')
if has('nvim-0.11') && luaeval('vim.tbl_isempty(vim.lsp.get_clients({ bufnr = 0 }))')
return ''
elseif luaeval('vim.tbl_isempty(vim.lsp.buf_get_clients())')
elseif !has('nvim-0.11') && luaeval('vim.tbl_isempty(vim.lsp.buf_get_clients(0))')
return ''
endif