Skip to content

Commit d9fe8b1

Browse files
committed
Setting foreground colors with respect to background
1 parent 6630674 commit d9fe8b1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

autoload/indent_guides.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ function! indent_guides#basic_highlight_colors()
102102
let l:cterm_colors = (&g:background == 'dark') ? ['darkgrey', 'black'] : ['lightgrey', 'white']
103103
let l:gui_colors = (&g:background == 'dark') ? ['grey15', 'grey30'] : ['grey70', 'grey85']
104104

105-
exe 'hi IndentGuidesEven guibg=' . l:gui_colors[0] . ' ctermbg=' . l:cterm_colors[0]
106-
exe 'hi IndentGuidesOdd guibg=' . l:gui_colors[1] . ' ctermbg=' . l:cterm_colors[1]
105+
exe 'hi IndentGuidesEven guibg=' . l:gui_colors[0] . ' guifg=' . l:gui_colors[1] . ' ctermbg=' . l:cterm_colors[0] . ' ctermfg=' . l:cterm_colors[1]
106+
exe 'hi IndentGuidesOdd guibg=' . l:gui_colors[1] . ' guifg=' . l:gui_colors[0] . ' ctermbg=' . l:cterm_colors[1] . ' ctermfg=' . l:cterm_colors[0]
107107
endfunction
108108

109109
"
@@ -134,8 +134,8 @@ function! indent_guides#gui_highlight_colors()
134134
let l:hi_even_bg = indent_guides#lighten_or_darken_color(l:hi_odd_bg)
135135

136136
" define the new highlights
137-
exe 'hi IndentGuidesOdd guibg=' . l:hi_odd_bg
138-
exe 'hi IndentGuidesEven guibg=' . l:hi_even_bg
137+
exe 'hi IndentGuidesOdd guibg=' . l:hi_odd_bg . ' guifg=' . l:hi_even_bg
138+
exe 'hi IndentGuidesEven guibg=' . l:hi_even_bg . ' guifg=' . l:hi_odd_bg
139139
end
140140
endfunction
141141

0 commit comments

Comments
 (0)