Add various plugins, configure lightline

Add ALE (Asynchronous Lint Engine), fugitive for git
and configure lightline to work better with both of these
This commit is contained in:
Edward Litherland-Smith 2020-12-18 10:38:50 +00:00
parent a673d5391a
commit f093ef8b6b
5 changed files with 44 additions and 0 deletions

9
.gitmodules vendored
View file

@ -7,3 +7,12 @@
[submodule "pack/plugins/start/auto-pairs"] [submodule "pack/plugins/start/auto-pairs"]
path = pack/plugins/start/auto-pairs path = pack/plugins/start/auto-pairs
url = https://github.com/jiangmiao/auto-pairs.git url = https://github.com/jiangmiao/auto-pairs.git
[submodule "pack/plugins/start/ale"]
path = pack/plugins/start/ale
url = https://github.com/dense-analysis/ale.git
[submodule "pack/plugins/start/lightline-ale"]
path = pack/plugins/start/lightline-ale
url = https://github.com/maximbaz/lightline-ale.git
[submodule "pack/plugins/start/vim-fugitive"]
path = pack/plugins/start/vim-fugitive
url = https://github.com/tpope/vim-fugitive.git

@ -0,0 +1 @@
Subproject commit f996ede5999c99b1b3e3cecc02dbd06cb286d3ff

@ -0,0 +1 @@
Subproject commit 23352556fdaa067209fa22df424f1b88ab370f6a

@ -0,0 +1 @@
Subproject commit bebe504e38d0a20c30d6dd666c4c793b3cc66104

32
vimrc
View file

@ -26,3 +26,35 @@ noremap <C-H> <C-W><C-H>
set splitbelow set splitbelow
set splitright set splitright
let g:lightline = {}
let g:lightline.component_expand = {
\ 'linter_checking': 'lightline#ale#checking',
\ 'linter_infos': 'lightline#ale#infos',
\ 'linter_warnings': 'lightline#ale#warnings',
\ 'linter_errors': 'lightline#ale#errors',
\ 'linter_ok': 'lightline#ale#ok',
\ }
let g:lightline.component_type = {
\ 'linter_checking': 'right',
\ 'linter_infos': 'right',
\ 'linter_warnings': 'warning',
\ 'linter_errors': 'error',
\ 'linter_ok': 'right',
\ }
let g:lightline.component_function = {
\ 'gitbranch': 'FugitiveHead'
\ }
let g:lightline.active = {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ],
\ 'right': [ [ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_infos', 'linter_ok', 'lineinfo' ],
\ [ 'percent' ],
\ [ 'fileformat', 'fileencoding', 'filetype' ] ]
\ }
set noshowmode