lightline-coc
This plugin provides coc diagnostics indicator for the lightline vim plugin.
Installation
Install using a plugin manager of your choice, for example vim-plug
:
Plug 'josa42/vim-lightline-coc'
Components
coc_errors
Number of diagnosics errorscoc_warnings
Number of diagnosics warningscoc_ok
Checkmark if there are no errors or warningscoc_status
Show status messeges if there are any.
Integration
let g:lightline = {
\ 'active': {
\ left': [[ '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_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_ok': 'left',
\ }
" Add the components to the lightline:
let g:lightline.active = {
\ left': [[ 'coc_errors', 'coc_warnings', 'coc_ok' ], [ 'coc_status' ]]
\ }
Configuration
-
g:lightline#coc#indicator_warnings
The indicator to use when there are warnings. Default is•
. -
g:lightline#coc#indicator_errors
The indicator to use when there are errors. Default is×
. -
g:lightline#coc#indicator_ok
The indicator to use when there are no warnings or errors. Default is✓
.
Credit
- The plugin is based on
maximbaz/lightline-ale