mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-25 09:41:33 +08:00
nvimlsp: Correct deprecation warning on nvimlsp plugin (#2678)
Also correct regression introduced in #2676 with #2677
This commit is contained in:
parent
6cc2c5c9e9
commit
16c1638f93
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user