48 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| " True color support
 | |
| let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum"
 | |
| let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum"
 | |
| 
 | |
| 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('BlueSign', l:palette.blue, l:palette.bg1)
 | |
|   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('GitCommitTemplateTag', l:palette.orange, l:palette.none)
 | |
|   call sonokai#highlight('GreenSign', l:palette.green, l:palette.bg1)
 | |
|   call sonokai#highlight('LineNr', l:palette.grey, l:palette.bg1)
 | |
|   call sonokai#highlight('RedSign', l:palette.red, l:palette.bg1)
 | |
|   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('YellowSign', l:palette.yellow, l:palette.bg1)
 | |
| endfunction
 | |
| 
 | |
| augroup CustomColors
 | |
|   autocmd!
 | |
|   autocmd ColorScheme sonokai call s:sonokai_custom()
 | |
| augroup END
 | |
| 
 | |
| " Colorscheme setup
 | |
| let g:lightline.colorscheme = 'sonokai'
 | |
| let g:sonokai_transparent_background = 1
 | |
| let g:sonokai_show_eob = 0
 | |
| 
 | |
| colorscheme sonokai
 |