This plugin provides neovim buildin lsp diagnostics indicator for the lightline vim plugin.
Install using a plugin manager of your choice, for example vim-plug
:
Plug 'josa42/nvim-lightline-lsp'
lsp_errors
Number of diagnostics errorslsp_warnings
Number of diagnostics warningslsp_info
Number of diagnostics information messageslsp_hints
Number of diagnostics hintslsp_ok
Checkmark if there are no errors or warningslsp_status
Show status messages if there are any.
let g:lightline = {
\ 'active': {
\ 'left': [[ 'lsp_info', 'lsp_hints', 'lsp_errors', 'lsp_warnings', 'lsp_ok' ], [ 'lsp_status' ]]
\ }
\ }
" register compoments:
call lightline#lsp#register()
Or register manually
" Register the components:
let g:lightline = {}
let g:lightline.component_expand = {
\ 'linter_warnings': 'lightline#lsp#warnings',
\ 'linter_errors': 'lightline#lsp#errors',
\ 'linter_info': 'lightline#lsp#info',
\ 'linter_hints': 'lightline#lsp#hints',
\ 'linter_ok': 'lightline#lsp#ok',
\ 'status': 'lightline#lsp#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': [[ 'lsp_info', 'lsp_hints', 'lsp_errors', 'lsp_warnings', 'lsp_ok' ], [ 'lsp_status' ]]
\ }
-
g:lightline#lsp#indicator_warnings
The indicator to use when there are warnings. Default is•
. -
g:lightline#lsp#indicator_errors
The indicator to use when there are errors. Default is×
. -
g:lightline#lsp#indicator_info
The indicator to use when there are information messages. Default is~
. -
g:lightline#lsp#indicator_hints
The indicator to use when there are hints. Default is>
. -
g:lightline#lsp#indicator_ok
The indicator to use when there are no warnings or errors. Default is✓
.
- The plugin is based on
maximbaz/lightline-ale