parent
d7fd8ca649
commit
e7560025d1
@ -82,8 +82,12 @@ values):
|
||||
<
|
||||
* themes are automatically selected based on the matching colorscheme. this
|
||||
can be overridden by defining a value. >
|
||||
let g:airline_theme=
|
||||
let g:airline_theme='dark'
|
||||
<
|
||||
Note: Only the dark theme is distributed with vim-airline. For more themes,
|
||||
checkout the vim-airline-themes repository
|
||||
(github.com/vim-airline/vim-airline-themes)
|
||||
|
||||
* if you want to patch the airline theme before it gets applied, you can
|
||||
supply the name of a function where you can modify the palette. >
|
||||
let g:airline_theme_patch_func = 'AirlineThemePatch'
|
||||
|
@ -7,8 +7,8 @@ endif
|
||||
let g:loaded_airline = 1
|
||||
|
||||
let s:airline_initialized = 0
|
||||
let s:airline_theme_defined = 0
|
||||
function! s:init()
|
||||
let s:airline_theme_defined = exists('g:airline_theme')
|
||||
if s:airline_initialized
|
||||
return
|
||||
endif
|
||||
@ -17,8 +17,11 @@ function! s:init()
|
||||
call airline#extensions#load()
|
||||
call airline#init#sections()
|
||||
|
||||
let s:airline_theme_defined = exists('g:airline_theme')
|
||||
if s:airline_theme_defined || !airline#switch_matching_theme()
|
||||
if !s:airline_theme_defined
|
||||
let g:airline_theme = 'dark'
|
||||
let s:airline_theme_defined = 1
|
||||
endif
|
||||
if !airline#switch_matching_theme()
|
||||
try
|
||||
let palette = g:airline#themes#{g:airline_theme}#palette
|
||||
catch
|
||||
|
Loading…
Reference in New Issue
Block a user