update
This commit is contained in:
parent
877df2f084
commit
549eb13f1c
33
init.vim
33
init.vim
|
@ -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 {{{
|
||||
|
|
Loading…
Reference in New Issue