[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:
parent
a4f1c22e77
commit
7940274ad0
30
vim/.vimrc
30
vim/.vimrc
|
@ -122,6 +122,14 @@ Plug 'honza/vim-snippets'
|
||||||
""""""
|
""""""
|
||||||
Plug 'rust-lang/rust.vim'
|
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()
|
call plug#end()
|
||||||
" }}}
|
" }}}
|
||||||
|
@ -201,7 +209,7 @@ colorscheme gruvbox
|
||||||
""""""""""""""""""""
|
""""""""""""""""""""
|
||||||
let g:lightline={}
|
let g:lightline={}
|
||||||
" Use the gruvbox colorscheme
|
" Use the gruvbox colorscheme
|
||||||
let g:lightline.colorscheme='gruvbox'
|
let g:lightline.colorscheme='wombat'
|
||||||
let g:lightline.active={
|
let g:lightline.active={
|
||||||
\ 'left': [
|
\ 'left': [
|
||||||
\ [ 'mode', 'paste' ],
|
\ [ 'mode', 'paste' ],
|
||||||
|
@ -212,6 +220,8 @@ let g:lightline.active={
|
||||||
\ [ 'lineinfo' ],
|
\ [ 'lineinfo' ],
|
||||||
\ [ 'percent' ],
|
\ [ 'percent' ],
|
||||||
\ [ 'fileformat', 'fileencoding', 'filetype' ],
|
\ [ 'fileformat', 'fileencoding', 'filetype' ],
|
||||||
|
\ [ 'linter_check', 'linter_errors', 'linter_warn', 'linter_ok' ],
|
||||||
|
\ [ 'ctags_status' ],
|
||||||
\ ]
|
\ ]
|
||||||
\ }
|
\ }
|
||||||
let g:lightline.inactive={
|
let g:lightline.inactive={
|
||||||
|
@ -228,6 +238,24 @@ let g:lightline.component_function={
|
||||||
\ 'modified': 'LightlineModified',
|
\ 'modified': 'LightlineModified',
|
||||||
\ 'gitbranch': 'LightlineFugitive',
|
\ '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 {{{
|
" Lightline function wrappers {{{
|
||||||
"""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""
|
||||||
|
|
Loading…
Reference in a new issue