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=\
|
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 {{{
|
||||||
|
|
Loading…
Reference in New Issue