-
Notifications
You must be signed in to change notification settings - Fork 129
/
Copy pathinit.lua
217 lines (183 loc) · 7.06 KB
/
init.lua
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
local high_visibility = require "material.util.config".settings.high_visibility
---colors table
local colors = {
---main colors
main = {
white = "#EEFFFF",
gray = "#717CB4",
black = "#000000",
red = "#F07178",
green = "#C3E88D",
yellow = "#FFCB6B",
blue = "#82AAFF",
paleblue = "#B0C9FF",
cyan = "#89DDFF",
purple = "#C792EA",
orange = "#F78C6C",
-- pink = "#FF9CAC",
darkred = "#DC6068",
darkgreen = "#ABCF76",
darkyellow = "#E6B455",
darkblue = "#6E98EB",
darkcyan = "#71C6E7",
darkpurple = "#B480D6",
darkorange = "#E2795B",
},
---colors applied to the editor
editor = {
link = "#80CBC4",
cursor = "#FFCC00",
title = "#EEFFFF",
},
lsp = {
error = "#FF5370",
},
syntax = {},
git = {},
backgrounds = {},
}
-- Style specific colors
if vim.g.material_style == "darker" then
-- Darker theme style
if high_visibility.darker then
-- Darker theme style with high contrast
colors.editor.line_numbers = "#5C5C5C"
colors.syntax.comments = "#757575"
else
-- default Darker theme style
colors.editor.line_numbers = "#424242"
colors.syntax.comments = "#515151"
end
colors.editor.bg = "#212121"
colors.editor.bg_alt = "#1A1A1A"
colors.editor.fg = "#B0BEC5"
colors.editor.fg_dark = "#8C8B8B"
colors.editor.selection = "#404040"
colors.editor.contrast = "#1A1A1A"
colors.editor.active = "#323232"
colors.editor.border = "#343434"
colors.editor.highlight = "#3F3F3F"
colors.editor.disabled = "#474747"
colors.editor.accent = "#FF9800"
elseif vim.g.material_style == "lighter" then
-- Lighter theme style
if high_visibility.lighter then
-- Lighter theme style with high contrast
colors.editor.fg = "#213B47" -- 20% darkened
colors.editor.fg_dark = "#61747D" -- 20% darkened
colors.editor.selection = "#e2e9e9" -- 15% saturation, 10% lightness
colors.editor.line_numbers = "#B6BFC3" -- 10% darkened
colors.editor.accent = "#0089A1" -- 20% darkened
colors.syntax.comments = "#778C96" -- 20% darkened
colors.main.red = "#B20602" -- 20% darkened
colors.main.green = "#5E8526" -- 20% darkened
colors.main.yellow = "#C37101" -- 20% darkened
colors.main.blue = "#2E4F85" -- 20% darkened
colors.main.paleblue = "#54637D" -- 20% darkened
colors.main.cyan = "#067A82" -- 20% darkened
colors.main.purple = "#491ACC" -- 20% darkened
colors.main.orange = "#C43A14" -- 20% darkened
colors.main.pink = "#CC203D" -- 20% darkened
else
-- default Lighter theme style
colors.editor.fg = "#546E7A"
colors.editor.fg_dark = "#94A7B0"
colors.editor.selection = "#80CBC4"
colors.editor.line_numbers = "#CFD8DC"
colors.editor.accent = "#00BCD4"
colors.syntax.comments = "#AABFC9"
colors.main.red = "#E53935"
colors.main.green = "#91B859"
colors.main.yellow = "#F6A434"
colors.main.blue = "#6182B8"
colors.main.paleblue = "#8796B0"
colors.main.cyan = "#39ADB5"
colors.main.purple = "#7C4DFF"
colors.main.orange = "#F76D47"
colors.main.pink = "#FF5370"
end
colors.editor.bg = "#FAFAFA"
colors.editor.bg_alt = "#FFFFFF"
colors.editor.contrast = "#EEEEEE"
colors.editor.active = "#E7E7E8"
colors.editor.border = "#D3E1E8"
colors.editor.highlight = "#E7E7E8"
colors.editor.disabled = "#D2D4D5"
colors.editor.cursor = "#272727"
colors.editor.white = "#FFFFFF"
colors.editor.gray = "#717CB4"
colors.editor.title = colors.main.black
elseif vim.g.material_style == "palenight" then
-- Palenight theme style
colors.editor.bg = "#292D3E"
colors.editor.bg_alt = "#1B1E2B"
colors.editor.fg = "#A6ACCD"
colors.editor.fg_dark = "#717CB4"
colors.editor.selection = "#444267"
colors.editor.contrast = "#202331"
colors.editor.active = "#414863"
colors.editor.border = "#364367"
colors.editor.line_numbers = "#3A3F58"
colors.editor.highlight = "#444267"
colors.editor.disabled = "#515772"
colors.editor.accent = "#AB47BC"
colors.editor.none = "NONE"
colors.syntax.comments = "#676E95"
elseif vim.g.material_style == "deep ocean" then
-- Deep Ocean theme style
colors.editor.bg = "#0F111A"
colors.editor.bg_alt = "#090B10"
colors.editor.fg = "#A6ACCD"
-- colors.editor.fg_darker = "#8DA3CA" -- TODO
colors.editor.fg_dark = "#717CB4"
colors.editor.selection = "#1F2233"
colors.editor.contrast = "#090B10"
colors.editor.active = "#1A1C25"
colors.editor.border = "#232637"
colors.editor.line_numbers = "#3B3F51"
colors.editor.highlight = "#1F2233"
colors.editor.disabled = "#464B5D"
colors.editor.accent = "#84FFFF"
colors.syntax.comments = "#464B5D"
else vim.g.material_style = "oceanic"
-- Oceanic theme style
colors.editor.bg = "#25363B"
colors.editor.bg_alt = "#1C2C30"
colors.editor.fg = "#B0BEC5"
colors.editor.fg_dark = "#7C9EAD"
-- colors.editor.fg_dark = "#4B504F"
colors.editor.selection = "#395B65"
colors.editor.border = "#355058"
colors.editor.line_numbers = "#426367"
colors.editor.highlight = "#354A51"-- highlight
colors.editor.disabled = "#3E5F64"
colors.editor.accent = "#11bba3"
colors.editor.contrast = "#1E272C"
colors.editor.active = "#314549"
colors.syntax.comments = "#546E7A"
end
---syntax colors
colors.syntax.variable = colors.editor.fg
colors.syntax.field = colors.editor.fg
colors.syntax.keyword = colors.main.purple
colors.syntax.value = colors.main.orange
colors.syntax.operator = colors.main.cyan
colors.syntax.fn = colors.main.blue
colors.syntax.parameter = colors.main.paleblue
colors.syntax.string = colors.main.green
colors.syntax.type = colors.main.purple
---git colors
colors.git.added = colors.main.green
colors.git.removed = colors.main.red
colors.git.modified = colors.main.blue
---lsp colors
colors.lsp.warning = colors.main.yellow
colors.lsp.info = colors.main.paleblue
colors.lsp.hint = colors.main.purple
---contrasted backgrounds
colors.backgrounds.sidebars = colors.editor.bg
colors.backgrounds.floating_windows = colors.editor.bg
colors.backgrounds.non_current_windows = colors.editor.bg
colors.backgrounds.bg_blend = colors.editor.bg -- backup used for blending backgrounds (issue: #212)
colors.backgrounds.cursor_line = colors.editor.active
return colors