Merge pull request #2282 from martskins/handle-lcn-not-running

Check LanguageClient-neovim's status before getting diagnostics
This commit is contained in:
Christian Brabandt 2020-11-09 18:35:51 +01:00 committed by GitHub
commit 9267cef0f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,6 +66,10 @@ function! s:airline_languageclient_get_line_number(type) abort
endfunction
function! airline#extensions#languageclient#get(type)
if get(b:, 'LanguageClient_isServerRunning', 0) ==# 0
return ''
endif
let is_err = a:type == s:severity_error
let symbol = is_err ? s:error_symbol : s:warning_symbol