This commit is contained in:
Ray Elliott 2020-07-31 14:27:19 +01:00
parent 877df2f084
commit 549eb13f1c
1 changed files with 163 additions and 148 deletions

View File

@ -291,20 +291,35 @@ set fillchars=stl:\ ,stlnc:\ ,vert:┃,fold:\
set statusline=\ set statusline=\
" buffer number " buffer number
set statusline+=[%n]\ \ set statusline+=[%n]\ \
" line of total_lines " line of total_lines and percentage through file
set statusline+=%l\ of\ %L\ set statusline+=%-20(%l\ of\ %L\ (%p%%)%)
" percentage through file " column, virtual column
set statusline+=(%p%%)\ set statusline+=%-7(:%c\ %((%V)%)%)
" column " separator, highlight color
set statusline+=:%c\ set statusline+=%=%#StatusLineNC#
" virtual column " Ale errors
set statusline+=%((%V)%) set statusline+=%{AleLinterStatus()}
" CoC status
set statusline+=%{coc#status()}\
" separator " separator
set statusline+=%= set statusline+=%=%#StatusLine#
set statusline+=%y\ set statusline+=%y\
set statusline+=%r\ %m\ %f set statusline+=%r\ %m\ %f
set statusline+=\ set statusline+=\
function! AleLinterStatus() abort
let l:counts = ale#statusline#Count(bufnr(''))
let l:all_errors = l:counts.error + l:counts.style_error
let l:all_non_errors = l:counts.total - l:all_errors
return l:counts.total == 0 ? '' : printf(
\ '[ %dW %dE ]',
\ all_non_errors,
\ all_errors
\)
endfunction
set conceallevel=0 set conceallevel=0
"----------------------------------------------------------------------------}}} "----------------------------------------------------------------------------}}}
" #mappings {{{ " #mappings {{{