[ADD][VIM] ALE and linting lighline integration

I changed the theme of lightline's statusline to wombat because the
errors did not have any color using gruvbox.
This commit is contained in:
Bruno BELANYI 2019-10-05 23:49:47 +02:00
parent a4f1c22e77
commit 7940274ad0

View file

@ -122,6 +122,14 @@ Plug 'honza/vim-snippets'
""""""
Plug 'rust-lang/rust.vim'
" }}}
"
" LSP {{{
"""""
" Asynchronous Linting Engine
Plug 'dense-analysis/ale'
" Pre-made ALE integration with lightline
Plug 'maximbaz/lightline-ale'
" }}}
call plug#end()
" }}}
@ -201,7 +209,7 @@ colorscheme gruvbox
""""""""""""""""""""
let g:lightline={}
" Use the gruvbox colorscheme
let g:lightline.colorscheme='gruvbox'
let g:lightline.colorscheme='wombat'
let g:lightline.active={
\ 'left': [
\ [ 'mode', 'paste' ],
@ -212,6 +220,8 @@ let g:lightline.active={
\ [ 'lineinfo' ],
\ [ 'percent' ],
\ [ 'fileformat', 'fileencoding', 'filetype' ],
\ [ 'linter_check', 'linter_errors', 'linter_warn', 'linter_ok' ],
\ [ 'ctags_status' ],
\ ]
\ }
let g:lightline.inactive={
@ -228,6 +238,24 @@ let g:lightline.component_function={
\ 'modified': 'LightlineModified',
\ 'gitbranch': 'LightlineFugitive',
\ }
let g:lightline.component_expand={
\ 'linter_check': 'lightline#ale#checking',
\ 'linter_warn': 'lightline#ale#warnings',
\ 'linter_errors': 'lightline#ale#errors',
\ 'linter_ok': 'lightline#ale#ok',
\ }
let g:lightline.component_type={
\ 'readonly': 'error',
\ 'linter_checking': 'left',
\ 'linter_warnings': 'warning',
\ 'linter_errors': 'error',
\ 'linter_ok': 'left',
\ }
" Show pretty icons instead of text for linting status
let g:lightline#ale#indicator_checking='⏳'
let g:lightline#ale#indicator_warnings='◆'
let g:lightline#ale#indicator_errors='✗'
let g:lightline#ale#indicator_ok='✓'
" Lightline function wrappers {{{
"""""""""""""""""""""""""""""