[nvim] use default coc.nvim plugin for airline

This commit is contained in:
Dmytro Meleshko 2020-03-25 21:43:27 +02:00
parent 63357c3394
commit ce7f8a30b9

View file

@ -101,15 +101,11 @@ endif
let g:airline#extensions#branch#enabled = 1 let g:airline#extensions#branch#enabled = 1
let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#coc#enabled = 0 let g:airline#extensions#coc#enabled = 1
let g:airline#extensions#tabline#left_sep = ' ' let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '' let g:airline#extensions#tabline#left_alt_sep = ''
let g:coc_status_error_sign = 'E:'
let g:coc_status_warning_sign = 'W:'
call airline#parts#define('coc#status', { 'function': 'coc#status', 'accent': 'airline_term' })
function StatusLine_filesize() function StatusLine_filesize()
let l:bytes = getfsize(expand('%')) let l:bytes = getfsize(expand('%'))
if l:bytes < 0 | return '' | endif if l:bytes < 0 | return '' | endif
@ -135,9 +131,6 @@ endif
let g:airline_section_{a:section} = g:airline_section_{a:section} . airline#section#create_left([''] + a:items) let g:airline_section_{a:section} = g:airline_section_{a:section} . airline#section#create_left([''] + a:items)
endfunction endfunction
function s:tweak_airline() function s:tweak_airline()
if g:vim_ide
call s:airline_section_prepend('x', ['coc#status'])
endif
call s:airline_section_append('y', ['filesize']) call s:airline_section_append('y', ['filesize'])
endfunction endfunction
augroup vimrc-interface-airline augroup vimrc-interface-airline