much more configurable colors
This commit is contained in:
parent
c2b11e4711
commit
38d442be3e
@ -131,26 +131,48 @@ endfunction
|
|||||||
" Functions -> s:set_colors() {{{2
|
" Functions -> s:set_colors() {{{2
|
||||||
func! s:set_colors() abort
|
func! s:set_colors() abort
|
||||||
if has('gui_running')
|
if has('gui_running')
|
||||||
let guibg = synIDattr(hlID('LineNr'), 'bg', 'gui')
|
let guifg_add = exists('g:signify_color_sign_guifg_add') ? g:signify_color_sign_guifg_add : '#11ee11'
|
||||||
|
let guifg_delete = exists('g:signify_color_sign_guifg_delete') ? g:signify_color_sign_guifg_delete : '#ee1111'
|
||||||
|
let guifg_change = exists('g:signify_color_sign_guifg_change') ? g:signify_color_sign_guifg_change : '#eeee11'
|
||||||
|
|
||||||
|
if exists('g:signify_color_sign_guibg')
|
||||||
|
let guibg = g:signify_color_sign_guibg
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('guibg')
|
||||||
|
let guibg = synIDattr(hlID('LineNr'), 'bg', 'gui')
|
||||||
|
endif
|
||||||
|
|
||||||
if empty(guibg) || guibg < 0
|
if empty(guibg) || guibg < 0
|
||||||
hi SignifyAdd gui=bold guifg=#11ee11
|
exe 'hi SignifyAdd gui=bold guifg='. guifg_add
|
||||||
hi SignifyDelete gui=bold guifg=#ee1111
|
exe 'hi SignifyDelete gui=bold guifg='. guifg_delete
|
||||||
hi SignifyChange gui=bold guifg=#eeee11
|
exe 'hi SignifyChange gui=bold guifg='. guifg_change
|
||||||
else
|
else
|
||||||
exe 'hi SignifyAdd gui=bold guifg=#11ee11 guibg='. guibg
|
exe 'hi SignifyAdd gui=bold guifg='. guifg_add .' guibg='. guibg
|
||||||
exe 'hi SignifyDelete gui=bold guifg=#ee1111 guibg='. guibg
|
exe 'hi SignifyDelete gui=bold guifg='. guifg_delete .' guibg='. guibg
|
||||||
exe 'hi SignifyChange gui=bold guifg=#eeee11 guibg='. guibg
|
exe 'hi SignifyChange gui=bold guifg='. guifg_change .' guibg='. guibg
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
let ctermbg = synIDattr(hlID('LineNr'), 'bg', 'cterm')
|
let ctermfg_add = exists('g:signify_color_sign_ctermfg_add') ? g:signify_color_sign_ctermfg_add : 2
|
||||||
|
let ctermfg_delete = exists('g:signify_color_sign_ctermfg_delete') ? g:signify_color_sign_ctermfg_delete : 1
|
||||||
|
let ctermfg_change = exists('g:signify_color_sign_ctermfg_change') ? g:signify_color_sign_ctermfg_change : 3
|
||||||
|
|
||||||
|
if exists('g:signify_color_sign_ctermbg')
|
||||||
|
let ctermbg = g:signify_color_sign_ctermbg
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('ctermbg')
|
||||||
|
let ctermbg = synIDattr(hlID('LineNr'), 'bg', 'cterm')
|
||||||
|
endif
|
||||||
|
|
||||||
if empty(ctermbg) || ctermbg < 0
|
if empty(ctermbg) || ctermbg < 0
|
||||||
hi SignifyAdd cterm=bold ctermfg=2
|
exe 'hi SignifyAdd cterm=bold ctermfg='. ctermfg_add
|
||||||
hi SignifyDelete cterm=bold ctermfg=1
|
exe 'hi SignifyDelete cterm=bold ctermfg='. ctermfg_delete
|
||||||
hi SignifyChange cterm=bold ctermfg=3
|
exe 'hi SignifyChange cterm=bold ctermfg='. ctermfg_change
|
||||||
else
|
else
|
||||||
exe 'hi SignifyAdd cterm=bold ctermfg=2 ctermbg='. ctermbg
|
exe 'hi SignifyAdd cterm=bold ctermfg='. ctermfg_add .' ctermbg='. ctermbg
|
||||||
exe 'hi SignifyDelete cterm=bold ctermfg=1 ctermbg='. ctermbg
|
exe 'hi SignifyDelete cterm=bold ctermfg='. ctermfg_delete .' ctermbg='. ctermbg
|
||||||
exe 'hi SignifyChange cterm=bold ctermfg=3 ctermbg='. ctermbg
|
exe 'hi SignifyChange cterm=bold ctermfg='. ctermfg_change .' ctermbg='. ctermbg
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user