mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-14 14:33:51 -05:00
improve setting colorscheme
This commit is contained in:
@@ -57,13 +57,15 @@ function! lightline#init()
|
|||||||
endfor
|
endfor
|
||||||
try
|
try
|
||||||
let g:lightline.palette = g:lightline#colorscheme#{g:lightline.colorscheme}#palette
|
let g:lightline.palette = g:lightline#colorscheme#{g:lightline.colorscheme}#palette
|
||||||
|
catch
|
||||||
|
call lightline#error('Colorscheme ' . g:lightline.colorscheme . ' not found.')
|
||||||
|
let g:lightline.colorscheme = 'default'
|
||||||
|
let g:lightline.palette = g:lightline#colorscheme#{g:lightline.colorscheme}#palette
|
||||||
|
finally
|
||||||
for m in ['normal', 'insert', 'replace', 'visual', 'inactive', 'command']
|
for m in ['normal', 'insert', 'replace', 'visual', 'inactive', 'command']
|
||||||
call lightline#highlight(m)
|
call lightline#highlight(m)
|
||||||
endfor
|
endfor
|
||||||
let s:_ = 0
|
let s:_ = 0
|
||||||
catch
|
|
||||||
call lightline#error('Colorscheme ' . g:lightline.colorscheme . ' not found.')
|
|
||||||
let g:lightline.colorscheme = 'default'
|
|
||||||
endtry
|
endtry
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user