53 lines
2.3 KiB
Plaintext
53 lines
2.3 KiB
Plaintext
" True color support
|
|
if exists('+termguicolors')
|
|
let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum"
|
|
let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum"
|
|
set termguicolors
|
|
endif
|
|
|
|
function! s:sonokai_custom() abort
|
|
" Link a highlight group to a predefined highlight group.
|
|
" See `colors/sonokai.vim` for all predefined highlight groups.
|
|
"highlight! link groupA groupB
|
|
"highlight! link groupC groupD
|
|
|
|
" Initialize the color palette.
|
|
" The parameter is a valid value for `g:sonokai_style`,
|
|
let l:palette = sonokai#get_palette('default')
|
|
" Define a highlight group.
|
|
" The first parameter is the name of a highlight group,
|
|
" the second parameter is the foreground color,
|
|
" the third parameter is the background color,
|
|
" the fourth parameter is for UI highlighting which is optional,
|
|
" and the last parameter is for `guisp` which is also optional.
|
|
" See `autoload/sonokai.vim` for the format of `l:palette`.
|
|
call sonokai#highlight('GitCommitTemplateTag', l:palette.orange, l:palette.none)
|
|
call sonokai#highlight('LineNr', l:palette.grey, l:palette.bg1)
|
|
call sonokai#highlight('CursorLineNr', l:palette.fg, l:palette.bg1, 'bold')
|
|
call sonokai#highlight('SignColumn', l:palette.fg, l:palette.bg1)
|
|
call sonokai#highlight('Terminal', l:palette.fg, l:palette.bg1)
|
|
call sonokai#highlight('VertSplit', l:palette.bg1, l:palette.none)
|
|
call sonokai#highlight('CocGitAddedSign', l:palette.green, l:palette.bg1)
|
|
call sonokai#highlight('CocGitChangeRemovedSign', l:palette.purple, l:palette.bg1)
|
|
call sonokai#highlight('CocGitChangedSign', l:palette.blue, l:palette.bg1)
|
|
call sonokai#highlight('CocGitRemovedSign', l:palette.red, l:palette.bg1)
|
|
call sonokai#highlight('CocGitTopRemovedSign', l:palette.red, l:palette.bg1)
|
|
call sonokai#highlight('BlueSign', l:palette.blue, l:palette.bg1)
|
|
call sonokai#highlight('GreenSign', l:palette.green, l:palette.bg1)
|
|
call sonokai#highlight('RedSign', l:palette.red, l:palette.bg1)
|
|
call sonokai#highlight('YellowSign', l:palette.yellow, l:palette.bg1)
|
|
call sonokai#highlight('CocHintSign', l:palette.grey, l:palette.none, 'italic')
|
|
endfunction
|
|
|
|
augroup CustomColors
|
|
autocmd!
|
|
autocmd ColorScheme sonokai call s:sonokai_custom()
|
|
augroup END
|
|
|
|
" Colorscheme setup
|
|
let g:lightline.colorscheme = 'sonokai'
|
|
let g:sonokai_show_eob = 0
|
|
let g:sonokai_transparent_background = 1
|
|
|
|
colorscheme sonokai
|