This plugin provides coc diagnostics indicator for the lightline vim plugin.
Install using a plugin manager of your choice, for example vim-plug:
Plug 'josa42/vim-lightline-coc'coc_errorsNumber of diagnostics errorscoc_warningsNumber of diagnostics warningscoc_infoNumber of diagnostics information messagescoc_hintsNumber of diagnostics hintscoc_okCheckmark if there are no errors or warningscoc_statusShow status messages if there are any.
let g:lightline = {
\ 'active': {
\ left': [[ 'coc_info', 'coc_hints', 'coc_errors', 'coc_warnings', 'coc_ok' ], [ 'coc_status' ]]
\ }
\ }
" register compoments:
call lightline#coc#register()Or register manually
" Register the components:
let g:lightline = {}
let g:lightline.component_expand = {
\ 'linter_warnings': 'lightline#coc#warnings',
\ 'linter_errors': 'lightline#coc#errors',
\ 'linter_info': 'lightline#coc#info',
\ 'linter_hints': 'lightline#coc#hints',
\ 'linter_ok': 'lightline#coc#ok',
\ 'status': 'lightline#coc#status',
\ }
" Set color to the components:
let g:lightline.component_type = {
\ 'linter_warnings': 'warning',
\ 'linter_errors': 'error',
\ 'linter_info': 'info',
\ 'linter_hints': 'hints',
\ 'linter_ok': 'left',
\ }
" Add the components to the lightline:
let g:lightline.active = {
\ left': [[ 'coc_info', 'coc_hints', 'coc_errors', 'coc_warnings', 'coc_ok' ], [ 'coc_status' ]]
\ }-
g:lightline#coc#indicator_warningsThe indicator to use when there are warnings. Default is•. -
g:lightline#coc#indicator_errorsThe indicator to use when there are errors. Default is×. -
g:lightline#coc#indicator_infoThe indicator to use when there are information messages. Default is~. -
g:lightline#coc#indicator_hintsThe indicator to use when there are hints. Default is>. -
g:lightline#coc#indicator_okThe indicator to use when there are no warnings or errors. Default is✓.
- The plugin is based on
maximbaz/lightline-ale
