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=\
" buffer number
set statusline+=[%n]\ \
" line of total_lines
set statusline+=%l\ of\ %L\
" percentage through file
set statusline+=(%p%%)\
" column
set statusline+=:%c\
" virtual column
set statusline+=%((%V)%)
" line of total_lines and percentage through file
set statusline+=%-20(%l\ of\ %L\ (%p%%)%)
" column, virtual column
set statusline+=%-7(:%c\ %((%V)%)%)
" separator, highlight color
set statusline+=%=%#StatusLineNC#
" Ale errors
set statusline+=%{AleLinterStatus()}
" CoC status
set statusline+=%{coc#status()}\
" separator
set statusline+=%=
set statusline+=%=%#StatusLine#
set statusline+=%y\
set statusline+=%r\ %m\ %f
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
"----------------------------------------------------------------------------}}}
" #mappings {{{