Skip to content

Commit 8fc46b6

Browse files
committed
refactor: remove highlight + palette autoload
Move autoloaded palette, highlight to color/srcery.vim. We don't have to reference this in multiple script files, so I've moved it back into the main colors file
1 parent 048f87c commit 8fc46b6

File tree

3 files changed

+372
-463
lines changed

3 files changed

+372
-463
lines changed

autoload/srcery.vim

Lines changed: 0 additions & 342 deletions
This file was deleted.

autoload/srcery/helper.vim

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -22,50 +22,4 @@ function! srcery#helper#GetColor(group, ...) abort
2222
return [ l:gui_color, l:term_color ]
2323
endfunction
2424

25-
function! srcery#helper#Highlight(group, fg, ...) abort
26-
" Arguments: group, guifg, guibg, gui, guisp
27-
28-
" foreground
29-
let l:fg = a:fg
30-
31-
" background
32-
if a:0 >= 1
33-
let l:bg = a:1
34-
else
35-
let l:bg = g:srcery#palette.none
36-
endif
37-
38-
" emphasis
39-
if a:0 >= 2 && strlen(a:2)
40-
let l:emstr = a:2
41-
else
42-
let l:emstr = 'NONE,'
43-
endif
44-
45-
" special fallback
46-
if a:0 >= 3
47-
if g:srcery_guisp_fallback !=# 'NONE'
48-
let fg = a:3
49-
endif
50-
51-
" bg fallback mode should invert higlighting
52-
if g:srcery_guisp_fallback ==# 'bg'
53-
let emstr .= 'inverse,'
54-
endif
55-
endif
56-
57-
let l:histring = [ 'hi', a:group,
58-
\ 'guifg=' . l:fg[0], 'ctermfg=' . l:fg[1],
59-
\ 'guibg=' . l:bg[0], 'ctermbg=' . l:bg[1],
60-
\ 'gui=' . l:emstr[:-2], 'cterm=' . l:emstr[:-2]
61-
\ ]
62-
63-
" special
64-
if a:0 >= 3
65-
call add(l:histring, 'guisp=' . a:3[0])
66-
endif
67-
68-
execute join(l:histring, ' ')
69-
endfunction
70-
7125
" vim: fdm=marker ts=2 sts=2 sw=2 fdl=0:

0 commit comments

Comments
 (0)