home: vim: configure 'lightline-lsp'
This pretty much replace 'lightline-ale' for me now. At least it will, once I have configured some LSP clients.
This commit is contained in:
parent
f73f59b06c
commit
d9a2c12d3f
|
@ -15,6 +15,7 @@ let g:lightline.active={
|
||||||
\ [ 'lineinfo' ],
|
\ [ 'lineinfo' ],
|
||||||
\ [ 'percent' ],
|
\ [ 'percent' ],
|
||||||
\ [ 'fileformat', 'fileencoding', 'filetype' ],
|
\ [ 'fileformat', 'fileencoding', 'filetype' ],
|
||||||
|
\ [ 'linter_errors', 'linter_warnings', 'linter_infos', 'linter_hints', 'linter_ok' ],
|
||||||
\ [ 'ctags_status' ],
|
\ [ 'ctags_status' ],
|
||||||
\ ]
|
\ ]
|
||||||
\ }
|
\ }
|
||||||
|
@ -37,11 +38,33 @@ let g:lightline.component_function={
|
||||||
\ 'gitbranch': 'LightlineFugitive',
|
\ 'gitbranch': 'LightlineFugitive',
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
|
" Which component can be expanded by using which function
|
||||||
|
let g:lightline.component_expand={
|
||||||
|
\ 'linter_hints': 'lightline#lsp#hints',
|
||||||
|
\ 'linter_infos': 'lightline#lsp#infos',
|
||||||
|
\ 'linter_warnings': 'lightline#lsp#warnings',
|
||||||
|
\ 'linter_errors': 'lightline#lsp#errors',
|
||||||
|
\ 'linter_ok': 'lightline#lsp#ok',
|
||||||
|
\ }
|
||||||
|
|
||||||
" How to color custom components
|
" How to color custom components
|
||||||
let g:lightline.component_type={
|
let g:lightline.component_type={
|
||||||
\ 'readonly': 'error',
|
\ 'readonly': 'error',
|
||||||
|
\ 'linter_hints': 'right',
|
||||||
|
\ 'linter_infos': 'right',
|
||||||
|
\ 'linter_warnings': 'warning',
|
||||||
|
\ 'linter_errors': 'error',
|
||||||
|
\ 'linter_ok': 'right',
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
|
" Show pretty icons instead of text for linting status
|
||||||
|
let g:lightline#lsp#indicator_hints='🔍'
|
||||||
|
let g:lightline#lsp#indicator_infos='ℹ'
|
||||||
|
let g:lightline#lsp#indicator_warnings='◆'
|
||||||
|
let g:lightline#lsp#indicator_errors='✗'
|
||||||
|
let g:lightline#lsp#indicator_ok='✓'
|
||||||
|
|
||||||
|
|
||||||
" Show a lock icon when editing a read-only file when it makes sense
|
" Show a lock icon when editing a read-only file when it makes sense
|
||||||
function! LightlineReadonly()
|
function! LightlineReadonly()
|
||||||
return &ft!~?'help\|vimfiler\|netrw' && &readonly ? '🔒' : ''
|
return &ft!~?'help\|vimfiler\|netrw' && &readonly ? '🔒' : ''
|
||||||
|
|
Loading…
Reference in a new issue