Open kthenrique opened 4 years ago
Not exactly the ideal fix but I dropped coc status from my statusline and created a custom function:
function! StatusDiagnostic() abort
let info = get(b:, 'coc_diagnostic_info', {})
if empty(info) | return '' | endif
let msgs = []
if get(info, 'error', 0)
call add(msgs, 'E' . info['error'])
endif
if get(info, 'warning', 0)
call add(msgs, 'W' . info['warning'])
endif
return join(msgs, ' ')
endfunction
" Lightline + Tabline
let g:lightline = {
\ 'colorscheme': 'onedark',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'filename', 'modified', 'statusdiag'] ]
\ },
\ 'component_function': {
\ 'statusdiag': 'StatusDiagnostic'
\ },
\ }
Not exactly the ideal fix but I dropped coc status from my statusline and created a custom function:
function! StatusDiagnostic() abort let info = get(b:, 'coc_diagnostic_info', {}) if empty(info) | return '' | endif let msgs = [] if get(info, 'error', 0) call add(msgs, 'E' . info['error']) endif if get(info, 'warning', 0) call add(msgs, 'W' . info['warning']) endif return join(msgs, ' ') endfunction " Lightline + Tabline let g:lightline = { \ 'colorscheme': 'onedark', \ 'active': { \ 'left': [ [ 'mode', 'paste' ], \ [ 'readonly', 'filename', 'modified', 'statusdiag'] ] \ }, \ 'component_function': { \ 'statusdiag': 'StatusDiagnostic' \ }, \ }
yeah, but I still wanna be able to see transient status info, like "searching for interpreter" or "Updating extensions" etc.
Thanks for the suggestion tho.
I believe this is where the interpreter name gets added to the statusline: https://github.com/neoclide/coc-python/blob/master/src/interpreter/display/index.ts#L69 I don't know (yet) how to make that configurable, or if it is at all possible.
Is there a way to hide the "Python \ \" line from the statusbar when using coc#status? It would be nice to have this as a json config like coc-spell-checker has:
[Neo]vim already can recognize file formats and many people already has it on their statusbar. It's a duplicity for me to have it switched on.