-
Notifications
You must be signed in to change notification settings - Fork 273
Closed
Description
I want to display the number of errors reported by LanguageClient-neovim using vim-arline. What I have right now is:
function! AirlineInit()
let g:airline_section_x = airline#section#create(['LC_status'])
let g:airline_section_error = airline#section#create(['LC_error_count'])
endfunction
call airline#parts#define_function('LC_error_count', 'LC_error_count')
call airline#parts#define_function('LC_status', 'LC_status')
function! LC_error_count()
let count = len(getqflist())
return count > 0 && g:LanguageClient_loaded ? 'E: ' . count : ''
endfunction
function! LC_status()
return g:LanguageClient_loaded ? LanguageClient#statusLine() : ''
endfunction
autocmd User AirlineAfterInit call AirlineInit()This is great for the LanguageClient#statusLine(), however I am currently relying on len(getqflist()) to get the number of errors from LS.
Is there a better way to get this number of diagnostic errors in order to use them in the status line?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels