mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-20 12:34:42 +02:00
nvimlsp: correctly call the lua functions for nvimlsp
closes #2324 Note: seems like one needs to call v:lua.vim.lsp.buf_get_clients() and even then some older neovims do not understand that. So wrap it around an exists() call and hope this works for all neovims.
This commit is contained in:
parent
bffa7a4d23
commit
50dfca52ed
@ -14,7 +14,8 @@ function! s:airline_nvimlsp_count(cnt, symbol) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#extensions#nvimlsp#get(type) abort
|
function! airline#extensions#nvimlsp#get(type) abort
|
||||||
if vim.lsp.buf_get_clients() == 0
|
if !exists("v:lua.vim.lsp.buf_get_clients()") ||
|
||||||
|
\ empty(v:lua.vim.lsp.buf_get_clients(0))
|
||||||
return ''
|
return ''
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user