Skip to content

Commit

Permalink
Import changes from ayu-theme#54
Browse files Browse the repository at this point in the history
  • Loading branch information
Luxed committed Jan 30, 2021
1 parent 9ec5770 commit 65839c6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion autoload/airline/themes/ayu.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
" Let's store all the colors in a dictionary.
let s:c = {}

let s:ayucolor = get(g:, 'ayucolor', 'dark')
let s:ayucolor = ayu#get_style()

if s:ayucolor == 'light'
" Base colors.
Expand Down
12 changes: 2 additions & 10 deletions autoload/ayu.vim
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,11 @@ let g:ayu#palette.fg_idle = {'light': "#828C99", 'mirage': "#607080", 'da
" }}}

function! ayu#get_style()
return get(g:, 'ayucolor', 'dark')
return &background ==# 'dark' ? get(g:, 'ayucolor', 'dark') : &background
endfunction

function! ayu#get_color(color_name)
let l:style = get(g:, 'ayucolor', 'dark')
let l:style = ayu#get_style()

return g:ayu#palette[a:color_name][l:style]
endfunction

function! ayu#get_background()
if ayu#get_style() ==? 'light'
return 'light'
else
return 'dark'
endif
endfunction
2 changes: 1 addition & 1 deletion autoload/lightline/colorscheme/ayu.vim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let s:style = get(g:, 'ayucolor', 'dark')
let s:style = ayu#get_style()

let s:fg = {}
let s:fg.primary = {'dark': '#E6E1CF', 'light': '#5C6773', 'mirage': '#D9D7CE'}[s:style]
Expand Down
2 changes: 0 additions & 2 deletions colors/ayu.vim
Original file line number Diff line number Diff line change
Expand Up @@ -199,5 +199,3 @@ call s:hi('LspDiagnosticsUnderlineError', 'error', '', 'underline')
call s:hi('LspDiagnosticsDefaultWarning', 'keyword', '')
call s:hi('LspDiagnosticsUnderlineWarning', 'keyword', '', 'underline')
" }}}

let &background = ayu#get_style()

0 comments on commit 65839c6

Please sign in to comment.