This plugin is a very simple plugin that integrates lightline.vim and vim-lsp. Display the diagnostic result of vim-lsp in the statusline of lightline.vim.
Install with your favorite plugin manager. Of course lightline.vim and vim-lsp are required.
For example, set g:lightline
in vimrc.
Just set component_expand
to this plugin's autoload function and specify its type.
See lightline.vim documentation for more infomation.
let g:lightline = {
\ 'active': {
\ 'right': [ [ 'lsp_errors', 'lsp_warnings', 'lsp_ok', 'lineinfo' ],
\ [ 'percent' ],
\ [ 'fileformat', 'fileencoding', 'filetype' ] ]
\ },
\ 'component_expand': {
\ 'lsp_warnings': 'lightline_lsp#warnings',
\ 'lsp_errors': 'lightline_lsp#errors',
\ 'lsp_ok': 'lightline_lsp#ok',
\ },
\ 'component_type': {
\ 'lsp_warnings': 'warning',
\ 'lsp_errors': 'error',
\ 'lsp_ok': 'middle',
\ },
\ }
The warning and error signs depend on the vim-lsp settings.
See vim-lsp documentation for more infomation.
The sign when vim-lsp diagnostic result does not exist is set with g:lightline_lsp_signs_ok
.
The default value if this global variable does not exist is OK
.