mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Add colorscheme gruvbox-material
This commit is contained in:
parent
6a5620c254
commit
0cac1585dd
@ -93,6 +93,7 @@ Plug 'KeitaNakamura/neodark.vim'
|
|||||||
Plug 'sainnhe/edge'
|
Plug 'sainnhe/edge'
|
||||||
Plug 'ghifarit53/tokyonight-vim'
|
Plug 'ghifarit53/tokyonight-vim'
|
||||||
Plug 'sainnhe/sonokai'
|
Plug 'sainnhe/sonokai'
|
||||||
|
Plug 'sainnhe/gruvbox-material'
|
||||||
|
|
||||||
if !exists('g:started_by_firenvim')
|
if !exists('g:started_by_firenvim')
|
||||||
" colorful status line and theme
|
" colorful status line and theme
|
||||||
|
|||||||
12
core/ui.vim
12
core/ui.vim
@ -77,14 +77,22 @@ function! s:my_theme_dict.tokyonight() dict abort
|
|||||||
colorscheme tokyonight
|
colorscheme tokyonight
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:my_theme_dict.gruvbox_material() dict abort
|
||||||
|
if !utils#HasColorscheme('gruvbox-material') | return | endif
|
||||||
|
let g:gruvbox_material_enable_italic = 1
|
||||||
|
let g:gruvbox_material_better_performance = 1
|
||||||
|
colorscheme gruvbox-material
|
||||||
|
endfunction
|
||||||
|
|
||||||
let s:candidate_theme = ['gruvbox8', 'deus', 'solarized8', 'onedark', 'neodark',
|
let s:candidate_theme = ['gruvbox8', 'deus', 'solarized8', 'onedark', 'neodark',
|
||||||
\ 'edge', 'sonokai', 'tokyonight']
|
\ 'edge', 'sonokai', 'tokyonight', 'gruvbox_material']
|
||||||
let s:idx = utils#RandInt(0, len(s:candidate_theme)-1)
|
let s:idx = utils#RandInt(0, len(s:candidate_theme)-1)
|
||||||
let s:theme = s:candidate_theme[s:idx]
|
let s:theme = s:candidate_theme[s:idx]
|
||||||
|
|
||||||
let s:colorscheme_func = printf('s:my_theme_dict.%s()', s:theme)
|
let s:colorscheme_func = printf('s:my_theme_dict.%s()', s:theme)
|
||||||
if has_key(s:my_theme_dict, s:theme)
|
if has_key(s:my_theme_dict, s:theme)
|
||||||
execute 'call ' . s:colorscheme_func
|
" execute 'call ' . s:colorscheme_func
|
||||||
|
call s:my_theme_dict.gruvbox_material()
|
||||||
else
|
else
|
||||||
echohl WarningMsg
|
echohl WarningMsg
|
||||||
echomsg 'Invalid colorscheme function: ' s:colorscheme_func
|
echomsg 'Invalid colorscheme function: ' s:colorscheme_func
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user