1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
local mode = 'dark' -- one of 'dark' or 'light'
local colors = {
black = '#100f0f',
base950 = '#1c1b1a',
base900 = '#282726',
base850 = '#343331',
base800 = '#403e3c',
base700 = '#575653',
base600 = '#6f6e69',
base500 = '#878580',
base300 = '#b7b5ac',
base200 = '#cecdc3',
base150 = '#dad8ce',
base100 = '#e6e4d9',
base50 = '#f2f0e5',
paper = '#fffcf0',
red600 = '#af3029',
orange600 = '#bc5215',
yellow600 = '#ad8301',
green600 = '#66800b',
cyan600 = '#24837b',
blue600 = '#205ea6',
purple600 = '#5e409d',
magenta600 = '#a02f6f',
red400 = '#d14d41',
orange400 = '#da702c',
yellow400 = '#d0a215',
green400 = '#879a39',
cyan400 = '#3aa99f',
blue400 = '#4385be',
purple400 = '#8b7ec8',
magenta400 = '#ce5d97',
}
if mode == 'light' then
colors.bg = colors.paper
colors.bg2 = colors.base50
colors.ui = colors.base100
colors.ui2 = colors.base150
colors.ui3 = colors.base200
colors.tx3 = colors.base300
colors.tx2 = colors.base600
colors.tx = colors.black
colors.re = colors.red600
colors.ng = colors.orange600
colors.ye = colors.yellow600
colors.gr = colors.green600
colors.cy = colors.cyan600
colors.bl = colors.blue600
colors.pu = colors.purple600
colors.ma = colors.magenta600
colors.re2 = colors.red400
colors.ng2 = colors.orange400
colors.ye2 = colors.yellow400
colors.gr2 = colors.green400
colors.cy2 = colors.cyan400
colors.bl2 = colors.blue400
colors.pu2 = colors.purple400
colors.ma2 = colors.magenta400
else
colors.bg = colors.black
colors.bg2 = colors.base950
colors.ui = colors.base900
colors.ui2 = colors.base850
colors.ui3 = colors.base800
colors.tx3 = colors.base700
colors.tx2 = colors.base500
colors.tx = colors.base200
colors.re = colors.red400
colors.ng = colors.orange400
colors.ye = colors.yellow400
colors.gr = colors.green400
colors.cy = colors.cyan400
colors.bl = colors.blue400
colors.pu = colors.purple400
colors.ma = colors.magenta400
colors.re2 = colors.red600
colors.ng2 = colors.orange600
colors.ye2 = colors.yellow600
colors.gr2 = colors.green600
colors.cy2 = colors.cyan600
colors.bl2 = colors.blue600
colors.pu2 = colors.purple600
colors.ma2 = colors.magenta600
end
vis.lexers.STYLE_DEFAULT = 'fore:'..colors.tx..',back:'..colors.bg
vis.lexers.STYLE_NOTHING = ''
vis.lexers.STYLE_CLASS = 'fore:'..colors.ng
vis.lexers.STYLE_COMMENT = 'fore:'..colors.tx3
vis.lexers.STYLE_CONSTANT = 'fore:'..colors.ye
vis.lexers.STYLE_DEFINITION = 'fore:'..colors.ng
vis.lexers.STYLE_ERROR = 'fore:'..colors.re2..',bold'
vis.lexers.STYLE_FUNCTION = 'fore:'..colors.ng
vis.lexers.STYLE_KEYWORD = 'fore:'..colors.gr
vis.lexers.STYLE_LABEL = 'fore:'..colors.gr
vis.lexers.STYLE_NUMBER = 'fore:'..colors.pu
vis.lexers.STYLE_OPERATOR = 'fore:'..colors.tx2
vis.lexers.STYLE_REGEX = 'fore:'..colors.cy
vis.lexers.STYLE_STRING = 'fore:'..colors.cy
vis.lexers.STYLE_PREPROCESSOR = 'fore:'..colors.ma
vis.lexers.STYLE_TAG = 'fore:'..colors.cy
vis.lexers.STYLE_TYPE = 'fore:'..colors.gr
vis.lexers.STYLE_VARIABLE = 'fore:'..colors.re..',bold'
vis.lexers.STYLE_WHITESPACE = 'fore:'..colors.tx3
vis.lexers.STYLE_EMBEDDED = 'fore:'..colors.re..',bold'
vis.lexers.STYLE_IDENTIFIER = 'fore:'..colors.bl
vis.lexers.STYLE_LINENUMBER = 'fore:'..colors.tx3
vis.lexers.STYLE_LINENUMBER_CURSOR = 'fore:'..colors.tx
vis.lexers.STYLE_CURSOR = 'fore:'..colors.bg..',back:'..colors.tx
vis.lexers.STYLE_CURSOR_PRIMARY = 'fore:'..colors.bg..',back:'..colors.tx
vis.lexers.STYLE_CURSOR_LINE = 'back:'..colors.bg2
vis.lexers.STYLE_COLOR_COLUMN = 'back:'..colors.ui
vis.lexers.STYLE_SELECTION = 'back:'..colors.ui
vis.lexers.STYLE_STATUS = 'fore:'..colors.tx2..',back:'..colors.ui
vis.lexers.STYLE_STATUS_FOCUSED = 'fore:'..colors.tx..',back:'..colors.ui2
vis.lexers.STYLE_SEPARATOR = 'fore:'..colors.ui3
vis.lexers.STYLE_INFO = 'fore:'..colors.ye..',bold'
vis.lexers.STYLE_EOF = 'fore:'..colors.tx3
|