<commit_before>set background=dark
hi clear
syntax reset

let g:colors_name = 'CreastyCode'

if !has('gui_running') && &t_Co != 88 && &t_Co != 256
  exit
endif


"=== Colors
"==============================================================================================
let g:creasty_code_palette = {
  \ 'foreground':  ['a0a0a0', 248],
  \ 'comment':     ['666666', 241],
  \ 'selection':   ['424242', 238],
  \ 'line':        ['2a2a2a', 236],
  \ 'window':      ['262626', 235],
  \ 'background':  ['121212', 232],
  \
  \ 'orange':      ['bc8d6d', 137],
  \
  \ 'red':         ['af7070', 1],
  \ 'green':       ['a3a46f', 2],
  \ 'yellow':      ['ceb481', 3],
  \ 'blue':        ['8397a9', 4],
  \ 'purple':      ['9d91a9', 5],
  \ 'aqua':        ['8aaaa5', 6],
  \
  \ 'dark_red':    ['503131', 9],
  \ 'dark_green':  ['4c4b30', 10],
  \ 'dark_yellow': ['5f5138', 11],
  \ 'dark_blue':   ['39444d', 12],
  \ 'dark_purple': ['47404d', 13],
  \ 'dark_aqua':   ['3c4e4b', 14],
\ }

" use this command to show all cterm codes
" for c in {000..255}; do echo -n "\e[38;5;${c}m ■$c"; [ $(($c % 16)) -eq 15 ] && echo; done; echo

" sets the highlighting for the given group
fun! CreastyCode(group, fg, bg, attr)
  let options = ''

  if a:fg != ''
    let fg = g:creasty_code_palette[a:fg]
    let options .= ' guifg=#' . fg[0] . ' ctermfg=' . fg[1]
  endif
  if a:bg != ''
    let bg = g:creasty_code_palette[a:bg]
    let options .= ' guibg=#' . bg[0] . ' ctermbg=' . bg[1]
  endif
  if a:attr != ''
    let options .= ' gui=' . a:attr . ' cterm=' . a:attr
  endif

  exec 'hi' a:group options
endfun


"=== General
"==============================================================================================
call CreastyCode('CursorLineNr', 'comment', 'line', 'none')
call CreastyCode('Directory', 'blue', '', '')
call CreastyCode('Error', 'background', 'red', '')
call CreastyCode('ErrorMsg', 'background', 'red', '')
call CreastyCode('FoldColumn', '', 'background', '')
call CreastyCode('Folded', 'comment', 'background', '')
call CreastyCode('LineNr', 'comment', '', 'none')
call CreastyCode('MatchParen', '', 'selection', '')
call CreastyCode('ModeMsg', 'green', '', '')
call CreastyCode('MoreMsg', 'green', '', '')
call CreastyCode('NonText', 'selection', '', '')
call CreastyCode('Normal', 'foreground', 'background', '')
call CreastyCode('Question', 'green', '', '')
call CreastyCode('Search', 'yellow', 'dark_yellow', 'underline')
call CreastyCode('SpecialKey', 'line', '', '')
call CreastyCode('StatusLine', 'window', 'comment', 'reverse')
call CreastyCode('StatusLineNC', 'window', 'window', '')
call CreastyCode('TabLine', 'window', 'comment', 'reverse')
call CreastyCode('TabLineFill', 'window', 'comment', 'reverse')
call CreastyCode('TabLineSel', 'window', 'foreground', '')
call CreastyCode('VertSplit', 'window', 'window', 'none')
call CreastyCode('Visual', '', 'selection', '')
call CreastyCode('WarningMsg', 'red', '', '')
call CreastyCode('WildMenu', 'background', 'yellow', '')

if version >= 700
  call CreastyCode('CursorColumn', '', 'line', 'none')<commit_msg>Use full-spell<commit_after>set background=dark
hi clear
syntax reset

let g:colors_name = 'CreastyCode'

if !has('gui_running') && &t_Co != 88 && &t_Co != 256
  exit
endif


"=== Colors
"==============================================================================================
let g:creasty_code_palette = {
  \ 'foreground':  ['a0a0a0', 248],
  \ 'comment':     ['666666', 241],
  \ 'selection':   ['424242', 238],
  \ 'line':        ['2a2a2a', 236],
  \ 'window':      ['262626', 235],
  \ 'background':  ['121212', 232],
  \
  \ 'orange':      ['bc8d6d', 137],
  \
  \ 'red':         ['af7070', 1],
  \ 'green':       ['a3a46f', 2],
  \ 'yellow':      ['ceb481', 3],
  \ 'blue':        ['8397a9', 4],
  \ 'purple':      ['9d91a9', 5],
  \ 'aqua':        ['8aaaa5', 6],
  \
  \ 'dark_red':    ['503131', 9],
  \ 'dark_green':  ['4c4b30', 10],
  \ 'dark_yellow': ['5f5138', 11],
  \ 'dark_blue':   ['39444d', 12],
  \ 'dark_purple': ['47404d', 13],
  \ 'dark_aqua':   ['3c4e4b', 14],
\ }

" use this command to show all cterm codes
" for c in {000..255}; do echo -n "\e[38;5;${c}m ■$c"; [ $(($c % 16)) -eq 15 ] && echo; done; echo

" sets the highlighting for the given group
function! CreastyCode(group, fg, bg, attr)
  let options = ''

  if a:fg != ''
    let fg = g:creasty_code_palette[a:fg]
    let options .= ' guifg=#' . fg[0] . ' ctermfg=' . fg[1]
  endif
  if a:bg != ''
    let bg = g:creasty_code_palette[a:bg]
    let options .= ' guibg=#' . bg[0] . ' ctermbg=' . bg[1]
  endif
  if a:attr != ''
    let options .= ' gui=' . a:attr . ' cterm=' . a:attr
  endif

  exec 'hi' a:group options
endfunction


"=== General
"==============================================================================================
call CreastyCode('CursorLineNr', 'comment', 'line', 'none')
call CreastyCode('Directory', 'blue', '', '')
call CreastyCode('Error', 'background', 'red', '')
call CreastyCode('ErrorMsg', 'background', 'red', '')
call CreastyCode('FoldColumn', '', 'background', '')
call CreastyCode('Folded', 'comment', 'background', '')
call CreastyCode('LineNr', 'comment', '', 'none')
call CreastyCode('MatchParen', '', 'selection', '')
call CreastyCode('ModeMsg', 'green', '', '')
call CreastyCode('MoreMsg', 'green', '', '')
call CreastyCode('NonText', 'selection', '', '')
call CreastyCode('Normal', 'foreground', 'background', '')
call CreastyCode('Question', 'green', '', '')
call CreastyCode('Search', 'yellow', 'dark_yellow', 'underline')
call CreastyCode('SpecialKey', 'line', '', '')
call CreastyCode('StatusLine', 'window', 'comment', 'reverse')
call CreastyCode('StatusLineNC', 'window', 'window', '')
call CreastyCode('TabLine', 'window', 'comment', 'reverse')
call CreastyCode('TabLineFill', 'window', 'comment', 'reverse')
call CreastyCode('TabLineSel', 'window', 'foreground', '')
call CreastyCode('VertSplit', 'window', 'window', 'none')
call CreastyCode('Visual', '', 'selection', '')
call CreastyCode('WarningMsg', 'red', '', '')
call CreastyCode('WildMenu', 'background', 'yellow', '')

if version >= 700
  call CreastyCode('CursorColumn', '', 'line', 'none')
{'fraction_non_alphanumeric': 0.2794046270829963, 'fraction_numerical': 0.046594402200291214, 'mean_word_length': 4.524575513851653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7191211', 'n_tokens_mistral': 2370, 'n_tokens_neox': 2126, 'n_words': 506}