mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 23:10:06 +08:00
perf(statusline): show errors counts on statusline
This commit is contained in:
parent
896a9a43ef
commit
e7091fbfaf
@ -256,7 +256,14 @@ endfunction
|
|||||||
|
|
||||||
|
|
||||||
function! s:syntax_checking() abort
|
function! s:syntax_checking() abort
|
||||||
if g:spacevim_lint_engine ==# 'neomake'
|
if SpaceVim#lsp#buf_server_ready()
|
||||||
|
let counts = v:lua.vim.diagnostic.count(0)
|
||||||
|
let warnings = get(counts, 1, 0)
|
||||||
|
let errors = get(counts, 0, 0)
|
||||||
|
let l = warnings ? '%#SpaceVim_statusline_warn# ● ' . warnings . ' ' : ''
|
||||||
|
let l .= errors ? (warnings ? '' : ' ') . '%#SpaceVim_statusline_error#● ' . errors . ' ' : ''
|
||||||
|
return l
|
||||||
|
elseif g:spacevim_lint_engine ==# 'neomake'
|
||||||
if !exists('g:loaded_neomake')
|
if !exists('g:loaded_neomake')
|
||||||
return ''
|
return ''
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user