Skip to content

Commit

Permalink
feat: add gui= and cterm= flags
Browse files Browse the repository at this point in the history
  • Loading branch information
jinh0 committed May 31, 2021
1 parent ae43190 commit da7c7ac
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions colors/spaceduck.vim
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ let s:palette = {
\
\ 'deep_space': ['#0f111b', '233'],
\ 'cream': ['#ecf0c1', '255'],
\ 'vision': ['#1b1c36', '234'],
\ 'cursor': ['#16172d', '234'],
\ 'selection': ['#30365F', '237'],
\ 'cursor': ['#1b1c36', '234'],
\
\ 'grey': ['#818596', '102'],
\ 'light_grey': ['#818596', '102'],
Expand All @@ -64,8 +64,10 @@ if &background == 'dark'

let s:palette.bg = s:palette.deep_space
let s:palette.fg = s:palette.cream
endif

elseif &background == 'light'
" I don't want anyone accidentally stumbling on this just yet
if exists('g:spaceduck_dev_light_theme')
hi SpaceduckRed guifg=#e33400 ctermfg=166 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
hi SpaceduckOrange guifg=#e39400 ctermfg=172 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
hi SpaceduckGreen guifg=#5ccc96 ctermfg=78 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
Expand All @@ -79,12 +81,12 @@ elseif &background == 'light'

hi SpaceduckForeground guifg=#ecf0c1 ctermfg=255 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE

let s:palette.bg = s:palette.cream
let s:palette.bg = s:palette.white
let s:palette.fg = s:palette.deep_space

endif
" }}}
"

" Highlight function {{{
function! s:hi(group, fg, bg, ...)
let hl_string = [
Expand All @@ -93,6 +95,8 @@ function! s:hi(group, fg, bg, ...)
\ 'guibg=' . a:bg[0],
\ 'ctermfg=' . a:fg[1],
\ 'ctermbg=' . a:bg[1],
\ 'gui=' . (a:0 >= 1 ? a:1 : 'NONE'),
\ 'cterm=' . (a:0 >= 1 ? a:1 : 'NONE')
\ ]

execute join(hl_string, ' ')
Expand All @@ -110,7 +114,7 @@ hi! link Conceal SpaceduckDarkPurple2
hi! link Conditional SpaceduckGreen
hi! link Constant SpaceduckYellow
hi Cursor guifg=#0f111b ctermfg=233 guibg=#818596 ctermbg=102 gui=NONE cterm=NONE
hi CursorLine guifg=NONE ctermfg=NONE guibg=#1b1c36 ctermbg=234 gui=NONE cterm=NONE
call s:hi('CursorLine', s:palette.none, s:palette.cursor)
hi CursorLineNr guifg=#c1c3cc ctermfg=251 guibg=#16172d ctermbg=234 gui=NONE cterm=NONE
hi! link Debug SpaceduckPurple
hi! link Define SpaceduckPurple2
Expand Down

0 comments on commit da7c7ac

Please sign in to comment.