nvimlsp: Use vim.lsp.buf_get_clients() for Neovim < 0.11

closes: #2676

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt 2024-05-19 21:47:31 +02:00
parent c3d1d13b72
commit 6cc2c5c9e9
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
1 changed files with 3 additions and 1 deletions

View File

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