diff options
Diffstat (limited to '.vim/pack/default/start/gruvbox/autoload/lightline')
-rw-r--r-- | .vim/pack/default/start/gruvbox/autoload/lightline/colorscheme/gruvbox.vim | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/.vim/pack/default/start/gruvbox/autoload/lightline/colorscheme/gruvbox.vim b/.vim/pack/default/start/gruvbox/autoload/lightline/colorscheme/gruvbox.vim new file mode 100644 index 0000000..4730c09 --- /dev/null +++ b/.vim/pack/default/start/gruvbox/autoload/lightline/colorscheme/gruvbox.vim | |||
@@ -0,0 +1,57 @@ | |||
1 | " ----------------------------------------------------------------------------- | ||
2 | " File: gruvbox.vim | ||
3 | " Description: Gruvbox colorscheme for Lightline (itchyny/lightline.vim) | ||
4 | " Author: gmoe <me@griffinmoe.com> | ||
5 | " Source: https://github.com/morhetz/gruvbox | ||
6 | " Last Modified: 20 Sep 2017 | ||
7 | " ----------------------------------------------------------------------------- | ||
8 | |||
9 | function! s:getGruvColor(group) | ||
10 | let guiColor = synIDattr(hlID(a:group), "fg", "gui") | ||
11 | let termColor = synIDattr(hlID(a:group), "fg", "cterm") | ||
12 | return [ guiColor, termColor ] | ||
13 | endfunction | ||
14 | |||
15 | if exists('g:lightline') | ||
16 | |||
17 | let s:bg0 = s:getGruvColor('GruvboxBg0') | ||
18 | let s:bg1 = s:getGruvColor('GruvboxBg1') | ||
19 | let s:bg2 = s:getGruvColor('GruvboxBg2') | ||
20 | let s:bg4 = s:getGruvColor('GruvboxBg4') | ||
21 | let s:fg1 = s:getGruvColor('GruvboxFg1') | ||
22 | let s:fg4 = s:getGruvColor('GruvboxFg4') | ||
23 | |||
24 | let s:yellow = s:getGruvColor('GruvboxYellow') | ||
25 | let s:blue = s:getGruvColor('GruvboxBlue') | ||
26 | let s:aqua = s:getGruvColor('GruvboxAqua') | ||
27 | let s:orange = s:getGruvColor('GruvboxOrange') | ||
28 | let s:green = s:getGruvColor('GruvboxGreen') | ||
29 | |||
30 | let s:p = {'normal':{}, 'inactive':{}, 'insert':{}, 'replace':{}, 'visual':{}, 'tabline':{}, 'terminal':{}} | ||
31 | let s:p.normal.left = [ [ s:bg0, s:fg4, 'bold' ], [ s:fg4, s:bg2 ] ] | ||
32 | let s:p.normal.right = [ [ s:bg0, s:fg4 ], [ s:fg4, s:bg2 ] ] | ||
33 | let s:p.normal.middle = [ [ s:fg4, s:bg1 ] ] | ||
34 | let s:p.inactive.right = [ [ s:bg4, s:bg1 ], [ s:bg4, s:bg1 ] ] | ||
35 | let s:p.inactive.left = [ [ s:bg4, s:bg1 ], [ s:bg4, s:bg1 ] ] | ||
36 | let s:p.inactive.middle = [ [ s:bg4, s:bg1 ] ] | ||
37 | let s:p.insert.left = [ [ s:bg0, s:blue, 'bold' ], [ s:fg1, s:bg2 ] ] | ||
38 | let s:p.insert.right = [ [ s:bg0, s:blue ], [ s:fg1, s:bg2 ] ] | ||
39 | let s:p.insert.middle = [ [ s:fg4, s:bg2 ] ] | ||
40 | let s:p.terminal.left = [ [ s:bg0, s:green, 'bold' ], [ s:fg1, s:bg2 ] ] | ||
41 | let s:p.terminal.right = [ [ s:bg0, s:green ], [ s:fg1, s:bg2 ] ] | ||
42 | let s:p.terminal.middle = [ [ s:fg4, s:bg2 ] ] | ||
43 | let s:p.replace.left = [ [ s:bg0, s:aqua, 'bold' ], [ s:fg1, s:bg2 ] ] | ||
44 | let s:p.replace.right = [ [ s:bg0, s:aqua ], [ s:fg1, s:bg2 ] ] | ||
45 | let s:p.replace.middle = [ [ s:fg4, s:bg2 ] ] | ||
46 | let s:p.visual.left = [ [ s:bg0, s:orange, 'bold' ], [ s:bg0, s:bg4 ] ] | ||
47 | let s:p.visual.right = [ [ s:bg0, s:orange ], [ s:bg0, s:bg4 ] ] | ||
48 | let s:p.visual.middle = [ [ s:fg4, s:bg1 ] ] | ||
49 | let s:p.tabline.left = [ [ s:fg4, s:bg2 ] ] | ||
50 | let s:p.tabline.tabsel = [ [ s:bg0, s:fg4 ] ] | ||
51 | let s:p.tabline.middle = [ [ s:bg0, s:bg0 ] ] | ||
52 | let s:p.tabline.right = [ [ s:bg0, s:orange ] ] | ||
53 | let s:p.normal.error = [ [ s:bg0, s:orange ] ] | ||
54 | let s:p.normal.warning = [ [ s:bg2, s:yellow ] ] | ||
55 | |||
56 | let g:lightline#colorscheme#gruvbox#palette = lightline#colorscheme#flatten(s:p) | ||
57 | endif | ||