mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Fix a bug about termguicolors option
We can not detect whether nvim-qt is loaded when sourcing `init.vim`. If termguicolors option is not set, we use a better color (badwolf in this case). Gruvbox8 is terrible when termguicolors is not set.
This commit is contained in:
parent
35a4fffe9d
commit
9d8d46197a
49
ui.vim
49
ui.vim
@ -2,15 +2,13 @@
|
|||||||
"{{ General settings about colors
|
"{{ General settings about colors
|
||||||
" Enable true colors support (Do not use this option if your terminal does not
|
" Enable true colors support (Do not use this option if your terminal does not
|
||||||
" support true colors! For a comprehensive list of terminals supporting true
|
" support true colors! For a comprehensive list of terminals supporting true
|
||||||
" colors, see https://github.com/termstandard/colors and https://bit.ly/2InF97t.
|
" colors, see https://github.com/termstandard/colors and
|
||||||
if exists("&termguicolors")
|
" https://bit.ly/2InF97t)
|
||||||
if $TERM == "xterm-256color" || exists('g:GuiLoaded')
|
if $TERM == "xterm-256color"
|
||||||
set termguicolors
|
set termguicolors
|
||||||
else
|
else
|
||||||
set notermguicolors
|
set notermguicolors
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Use dark background
|
" Use dark background
|
||||||
set background=dark
|
set background=dark
|
||||||
"}}
|
"}}
|
||||||
@ -19,16 +17,27 @@ set background=dark
|
|||||||
""""""""""""""""""""""""""""gruvbox settings"""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""gruvbox settings"""""""""""""""""""""""""""
|
||||||
" We should check if theme exists before using it, otherwise you will get
|
" We should check if theme exists before using it, otherwise you will get
|
||||||
" error message when starting Nvim
|
" error message when starting Nvim
|
||||||
if utils#HasColorscheme('gruvbox8')
|
if &termguicolors
|
||||||
" Italic options should be put before colorscheme setting,
|
if utils#HasColorscheme('gruvbox8')
|
||||||
" see https://goo.gl/8nXhcp
|
" Italic options should be put before colorscheme setting,
|
||||||
let g:gruvbox_italics=1
|
" see https://goo.gl/8nXhcp
|
||||||
let g:gruvbox_italicize_strings=1
|
let g:gruvbox_italics=1
|
||||||
let g:gruvbox_filetype_hi_groups = 0
|
let g:gruvbox_italicize_strings=1
|
||||||
let g:gruvbox_plugin_hi_groups = 0
|
let g:gruvbox_filetype_hi_groups = 0
|
||||||
colorscheme gruvbox8_hard
|
let g:gruvbox_plugin_hi_groups = 0
|
||||||
|
colorscheme gruvbox8_hard
|
||||||
|
else
|
||||||
|
colorscheme desert
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
colorscheme desert
|
if utils#HasColorscheme('badwolf')
|
||||||
|
let g:badwolf_darkgutter = 0
|
||||||
|
" Make the tab line lighter than the background.
|
||||||
|
let g:badwolf_tabline = 2
|
||||||
|
colorscheme badwolf
|
||||||
|
else
|
||||||
|
colorscheme desert
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
""""""""""""""""""""""""""" deus settings"""""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""" deus settings"""""""""""""""""""""""""""""""""
|
||||||
@ -49,11 +58,5 @@ endif
|
|||||||
" " theme_style can be 'default', 'dark' or 'palenight'
|
" " theme_style can be 'default', 'dark' or 'palenight'
|
||||||
" let g:material_theme_style = 'dark'
|
" let g:material_theme_style = 'dark'
|
||||||
" colorscheme material
|
" colorscheme material
|
||||||
|
|
||||||
"""""""""""""""""""""""""""badwolf settings""""""""""""""""""""""""""
|
|
||||||
" let g:badwolf_darkgutter = 0
|
|
||||||
" " Make the tab line lighter than the background.
|
|
||||||
" let g:badwolf_tabline = 2
|
|
||||||
" colorscheme badwolf
|
|
||||||
"}}
|
"}}
|
||||||
"}
|
"}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user