mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-12-16 20:00:50 +01:00
Update lightline config in .vimrc
wal.vim includes a color scheme for lightline, but it only plays nicely with neovim. This commit conditionally loads the wal color scheme since using it in vim will throw multiple errors.
This commit is contained in:
parent
96c3cc949f
commit
9e5450f25b
47
.vimrc
47
.vimrc
@ -94,23 +94,6 @@ set mouse=a " Enable mouse support in (a)ll modes
|
||||
|
||||
colorscheme wal
|
||||
|
||||
" Wal Themes: Tomorrow, Tomorrow_Night, one, materia, material, nord
|
||||
" Other Themes: wombat, solarized, powerline, jellybeans, Tomorrow_Night_Blue,
|
||||
" Tomorrow_Night_Eighties, PaperColor, seoul256, landscape,
|
||||
" darcula, molokai, OldHope, deus
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'Tomorrow_Night',
|
||||
\ 'active': {
|
||||
\ 'left': [
|
||||
\ [ 'mode', 'paste' ], [ 'gitbranch' ],
|
||||
\ ['readonly', 'filename', 'modified']
|
||||
\ ]
|
||||
\ },
|
||||
\ 'component_function': {
|
||||
\ 'gitbranch': 'fugitive#head'
|
||||
\ },
|
||||
\ }
|
||||
|
||||
" Don't show the separator for vertical splits
|
||||
highlight vertsplit ctermfg=0 ctermbg=none
|
||||
|
||||
@ -125,6 +108,36 @@ call matchadd('OverLength', '\%80v')
|
||||
autocmd BufNewFile,BufRead *.ecr setlocal syntax=html
|
||||
autocmd BufNewFile,BufRead *.slang setlocal filetype=slim
|
||||
|
||||
" =============================
|
||||
" ========= lightline =========
|
||||
" =============================
|
||||
|
||||
" Add the current branch to the status line
|
||||
let g:lightline = {
|
||||
\ 'active': {
|
||||
\ 'left': [
|
||||
\ [ 'mode', 'paste' ], [ 'gitbranch' ],
|
||||
\ ['readonly', 'filename', 'modified']
|
||||
\ ]
|
||||
\ },
|
||||
\ 'component_function': {
|
||||
\ 'gitbranch': 'fugitive#head'
|
||||
\ }
|
||||
\ }
|
||||
|
||||
" Note that wal.vim's lightline theme uses some options that are incompatible
|
||||
" with regular vim and are only supported by neovim.
|
||||
"
|
||||
" Wal Themes: Tomorrow, Tomorrow_Night, one, materia, material, nord
|
||||
" Other Themes: wombat, solarized, powerline, jellybeans, Tomorrow_Night_Blue,
|
||||
" Tomorrow_Night_Eighties, PaperColor, seoul256, landscape,
|
||||
" darcula, molokai, OldHope, deus
|
||||
if has('nvim')
|
||||
let g:lightline.colorscheme = 'wal'
|
||||
else
|
||||
let g:lightline.colorscheme = 'Tomorrow_Night'
|
||||
endif
|
||||
|
||||
" ============================
|
||||
" ========= keybinds =========
|
||||
" ============================
|
||||
|
Loading…
Reference in New Issue
Block a user