mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-04-08 19:35:31 +02:00
nvimlsp: do not check for :LspInstallInfo
nvimlsp removed the :LspInstallInfo command. So instead check explicitly for neovim for enabling the nvimlsp extension. In the extension itself check that at least one LSP is attached to the buffer before returning warning and error messages. closes #2323
This commit is contained in:
parent
c7a633ce8f
commit
bffa7a4d23
autoload/airline
@ -338,7 +338,7 @@ function! airline#extensions#load()
|
||||
endif
|
||||
|
||||
if (get(g:, 'airline#extensions#nvimlsp#enabled', 1)
|
||||
\ && exists(':LspInstallInfo'))
|
||||
\ && has("nvim"))
|
||||
call airline#extensions#nvimlsp#init(s:ext)
|
||||
call add(s:loaded_ext, 'nvimlsp')
|
||||
endif
|
||||
|
@ -5,7 +5,7 @@
|
||||
scriptencoding utf-8
|
||||
|
||||
if !(get(g:, 'airline#extensions#nvimlsp#enabled', 1)
|
||||
\ && exists(':LspInstallInfo'))
|
||||
\ && has("nvim"))
|
||||
finish
|
||||
endif
|
||||
|
||||
@ -14,7 +14,7 @@ function! s:airline_nvimlsp_count(cnt, symbol) abort
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#nvimlsp#get(type) abort
|
||||
if !exists(':LspInstallInfo')
|
||||
if vim.lsp.buf_get_clients() == 0
|
||||
return ''
|
||||
endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user