Support terminal colors for Vim (#44)

This commit is contained in:
Chayoung You 2020-04-13 20:02:49 +09:00 committed by GitHub
parent e851765ccf
commit a3a2d2a4ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -192,7 +192,7 @@ exe "hi! Conceal" .s:fg_guide .s:bg_none .s:fmt_none
exe "hi! CursorLineConceal" .s:fg_guide .s:bg_line .s:fmt_none
" Terminal in NVIM
" Terminal
" ---------
if has("nvim")
let g:terminal_color_0 = s:palette.bg[s:style]
@ -213,6 +213,15 @@ if has("nvim")
let g:terminal_color_15 = s:palette.comment[s:style]
let g:terminal_color_background = g:terminal_color_0
let g:terminal_color_foreground = s:palette.fg[s:style]
else
let g:terminal_ansi_colors = [s:palette.bg[s:style], s:palette.markup[s:style]]
let g:terminal_ansi_colors += [s:palette.string[s:style], s:palette.accent[s:style]]
let g:terminal_ansi_colors += [s:palette.tag[s:style], s:palette.constant[s:style]]
let g:terminal_ansi_colors += [s:palette.regexp[s:style], "#FFFFFF"]
let g:terminal_ansi_colors += [s:palette.fg_idle[s:style], s:palette.error[s:style]]
let g:terminal_ansi_colors += [s:palette.string[s:style], s:palette.accent[s:style]]
let g:terminal_ansi_colors += [s:palette.tag[s:style], s:palette.constant[s:style]]
let g:terminal_ansi_colors += [s:palette.regexp[s:style], s:palette.comment[s:style]]
endif