Files
zenbones-theme/autoload/zenbones.vim

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
531 B
VimL
Raw Normal View History

2021-11-06 14:06:48 +08:00
function! zenbones#setup_colorscheme(...) abort
2021-11-06 13:05:03 +08:00
if exists('g:colors_name')
highlight clear
endif
let g:colors_name = a:1
let l:bg = a:0 == 2 ? a:2 : v:null
2021-11-06 13:19:03 +08:00
if l:bg != v:null
let &background = l:bg
2021-11-06 13:05:03 +08:00
endif
if has('nvim') && (!exists('g:' . g:colors_name . '_compat') || g:{g:colors_name}_compat == 0)
lua require("zenbones.util").apply_colorscheme()
else
2021-11-06 14:06:48 +08:00
call zenbones#generated#{g:colors_name . (l:bg == v:null ? '_' . &background : '')}#load()
2021-11-06 13:05:03 +08:00
endif
endfunction