mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-25 17:57:36 +08: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
|
||||
|
||||
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 ''
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user