662
|
1 " Theme: PaperColor
|
|
2 " Author: Nikyle Nguyen <NLKNguyen@MSN.com>
|
|
3 " License: MIT
|
|
4 " Source: http://github.com/NLKNguyen/papercolor-theme
|
|
5
|
|
6 let s:version = '0.9.x'
|
|
7
|
|
8 " Note on navigating this source code:
|
|
9 " - Use folding feature to collapse/uncollapse blocks of marked code
|
|
10 " zM to fold all markers in this file to see the structure of the source code
|
|
11 " zR to unfold all recursively
|
|
12 " za to toggle a fold
|
|
13 " See: http://vim.wikia.com/wiki/Folding
|
|
14 " - The main section is at the end where the functions are called in order.
|
|
15
|
|
16 " Theme Repository: {{{
|
|
17
|
|
18 let s:themes = {}
|
|
19
|
|
20 " }}}
|
|
21
|
|
22 fun! s:register_default_theme()
|
|
23 " Theme name should be lowercase
|
|
24 let s:themes['default'] = {
|
|
25 \ 'maintainer' : 'Nikyle Nguyen <me@Nikyle.com>',
|
|
26 \ 'source' : 'http://github.com/NLKNguyen/papercolor-theme',
|
|
27 \ 'description' : 'The original PaperColor Theme, inspired by Google Material Design',
|
|
28 \ 'options' : {
|
|
29 \ 'allow_bold': 1
|
|
30 \ }
|
|
31 \ }
|
|
32
|
|
33 " Theme can have 'light' and/or 'dark' color palette.
|
|
34 " Color values can be HEX and/or 256-color. Use empty string '' if not provided.
|
|
35 " Only color00 -> color15 are required. The rest are optional.
|
|
36 let s:themes['default'].light = {
|
|
37 \ 'NO_CONVERSION': 1,
|
|
38 \ 'TEST_256_COLOR_CONSISTENCY' : 1,
|
|
39 \ 'palette' : {
|
|
40 \ 'color00' : ['#eeeeee', '255'],
|
|
41 \ 'color01' : ['#af0000', '124'],
|
|
42 \ 'color02' : ['#008700', '28'],
|
|
43 \ 'color03' : ['#5f8700', '64'],
|
|
44 \ 'color04' : ['#0087af', '31'],
|
|
45 \ 'color05' : ['#878787', '102'],
|
|
46 \ 'color06' : ['#005f87', '24'],
|
|
47 \ 'color07' : ['#444444', '238'],
|
|
48 \ 'color08' : ['#bcbcbc', '250'],
|
|
49 \ 'color09' : ['#d70000', '160'],
|
|
50 \ 'color10' : ['#d70087', '162'],
|
|
51 \ 'color11' : ['#8700af', '91'],
|
|
52 \ 'color12' : ['#d75f00', '166'],
|
|
53 \ 'color13' : ['#d75f00', '166'],
|
|
54 \ 'color14' : ['#005faf', '25'],
|
|
55 \ 'color15' : ['#005f87', '24'],
|
|
56 \ 'color16' : ['#0087af', '31'],
|
|
57 \ 'color17' : ['#008700', '28'],
|
|
58 \ 'cursor_fg' : ['#eeeeee', '255'],
|
|
59 \ 'cursor_bg' : ['#005f87', '24'],
|
|
60 \ 'cursorline' : ['#e4e4e4', '254'],
|
|
61 \ 'cursorcolumn' : ['#e4e4e4', '254'],
|
|
62 \ 'cursorlinenr_fg' : ['#af5f00', '130'],
|
|
63 \ 'cursorlinenr_bg' : ['#eeeeee', '255'],
|
|
64 \ 'popupmenu_fg' : ['#444444', '238'],
|
|
65 \ 'popupmenu_bg' : ['#d0d0d0', '252'],
|
|
66 \ 'search_fg' : ['#444444', '238'],
|
|
67 \ 'search_bg' : ['#ffff5f', '227'],
|
|
68 \ 'linenumber_fg' : ['#b2b2b2', '249'],
|
|
69 \ 'linenumber_bg' : ['#eeeeee', '255'],
|
|
70 \ 'vertsplit_fg' : ['#005f87', '24'],
|
|
71 \ 'vertsplit_bg' : ['#eeeeee', '255'],
|
|
72 \ 'statusline_active_fg' : ['#e4e4e4', '254'],
|
|
73 \ 'statusline_active_bg' : ['#005f87', '24'],
|
|
74 \ 'statusline_inactive_fg' : ['#444444', '238'],
|
|
75 \ 'statusline_inactive_bg' : ['#d0d0d0', '252'],
|
|
76 \ 'todo_fg' : ['#00af5f', '35'],
|
|
77 \ 'todo_bg' : ['#eeeeee', '255'],
|
|
78 \ 'error_fg' : ['#af0000', '124'],
|
|
79 \ 'error_bg' : ['#ffd7ff', '225'],
|
|
80 \ 'matchparen_bg' : ['#c6c6c6', '251'],
|
|
81 \ 'matchparen_fg' : ['#005f87', '24'],
|
|
82 \ 'visual_fg' : ['#eeeeee', '255'],
|
|
83 \ 'visual_bg' : ['#0087af', '31'],
|
|
84 \ 'folded_fg' : ['#0087af', '31'],
|
|
85 \ 'folded_bg' : ['#afd7ff', '153'],
|
|
86 \ 'wildmenu_fg': ['#444444', '238'],
|
|
87 \ 'wildmenu_bg': ['#ffff00', '226'],
|
|
88 \ 'spellbad': ['#ffafd7', '218'],
|
|
89 \ 'spellcap': ['#ffffaf', '229'],
|
|
90 \ 'spellrare': ['#afff87', '156'],
|
|
91 \ 'spelllocal': ['#d7d7ff', '189'],
|
|
92 \ 'diffadd_fg': ['#008700', '28'],
|
|
93 \ 'diffadd_bg': ['#afffaf', '157'],
|
|
94 \ 'diffdelete_fg': ['#af0000', '124'],
|
|
95 \ 'diffdelete_bg': ['#ffd7ff', '225'],
|
|
96 \ 'difftext_fg': ['#0087af', '31'],
|
|
97 \ 'difftext_bg': ['#ffffd7', '230'],
|
|
98 \ 'diffchange_fg': ['#444444', '238'],
|
|
99 \ 'diffchange_bg': ['#ffd787', '222'],
|
|
100 \ 'tabline_bg': ['#005f87', '24'],
|
|
101 \ 'tabline_active_fg': ['#444444', '238'],
|
|
102 \ 'tabline_active_bg': ['#e4e4e4', '254'],
|
|
103 \ 'tabline_inactive_fg': ['#eeeeee', '255'],
|
|
104 \ 'tabline_inactive_bg': ['#0087af', '31'],
|
|
105 \ 'buftabline_bg': ['#005f87', '24'],
|
|
106 \ 'buftabline_current_fg': ['#444444', '238'],
|
|
107 \ 'buftabline_current_bg': ['#e4e4e4', '254'],
|
|
108 \ 'buftabline_active_fg': ['#eeeeee', '255'],
|
|
109 \ 'buftabline_active_bg': ['#005faf', '25'],
|
|
110 \ 'buftabline_inactive_fg': ['#eeeeee', '255'],
|
|
111 \ 'buftabline_inactive_bg': ['#0087af', '31']
|
|
112 \ }
|
|
113 \ }
|
|
114
|
|
115 " TODO: idea for subtheme options
|
|
116 " let s:themes['default'].light.subtheme = {
|
|
117 " \ 'alternative' : {
|
|
118 " \ 'options' : {
|
|
119 " \ 'transparent_background': 1
|
|
120 " \ },
|
|
121 " \ 'palette' : {
|
|
122 " \ }
|
|
123 " \ }
|
|
124 " \ }
|
|
125
|
|
126 let s:themes['default'].dark = {
|
|
127 \ 'NO_CONVERSION': 1,
|
|
128 \ 'TEST_256_COLOR_CONSISTENCY' : 1,
|
|
129 \ 'palette' : {
|
|
130 \ 'color00' : ['#1c1c1c', '234'],
|
|
131 \ 'color01' : ['#af005f', '125'],
|
|
132 \ 'color02' : ['#5faf00', '70'],
|
|
133 \ 'color03' : ['#d7af5f', '179'],
|
|
134 \ 'color04' : ['#5fafd7', '74'],
|
|
135 \ 'color05' : ['#808080', '244'],
|
|
136 \ 'color06' : ['#d7875f', '173'],
|
|
137 \ 'color07' : ['#d0d0d0', '252'],
|
|
138 \ 'color08' : ['#585858', '240'],
|
|
139 \ 'color09' : ['#5faf5f', '71'],
|
|
140 \ 'color10' : ['#afd700', '148'],
|
|
141 \ 'color11' : ['#af87d7', '140'],
|
|
142 \ 'color12' : ['#ffaf00', '214'],
|
|
143 \ 'color13' : ['#ff5faf', '205'],
|
|
144 \ 'color14' : ['#00afaf', '37'],
|
|
145 \ 'color15' : ['#5f8787', '66'],
|
|
146 \ 'color16' : ['#5fafd7', '74'],
|
|
147 \ 'color17' : ['#d7af00', '178'],
|
|
148 \ 'cursor_fg' : ['#1c1c1c', '234'],
|
|
149 \ 'cursor_bg' : ['#c6c6c6', '251'],
|
|
150 \ 'cursorline' : ['#303030', '236'],
|
|
151 \ 'cursorcolumn' : ['#303030', '236'],
|
|
152 \ 'cursorlinenr_fg' : ['#ffff00', '226'],
|
|
153 \ 'cursorlinenr_bg' : ['#1c1c1c', '234'],
|
|
154 \ 'popupmenu_fg' : ['#c6c6c6', '251'],
|
|
155 \ 'popupmenu_bg' : ['#303030', '236'],
|
|
156 \ 'search_fg' : ['#000000', '16'],
|
|
157 \ 'search_bg' : ['#00875f', '29'],
|
|
158 \ 'linenumber_fg' : ['#585858', '240'],
|
|
159 \ 'linenumber_bg' : ['#1c1c1c', '234'],
|
|
160 \ 'vertsplit_fg' : ['#5f8787', '66'],
|
|
161 \ 'vertsplit_bg' : ['#1c1c1c', '234'],
|
|
162 \ 'statusline_active_fg' : ['#1c1c1c', '234'],
|
|
163 \ 'statusline_active_bg' : ['#5f8787', '66'],
|
|
164 \ 'statusline_inactive_fg' : ['#bcbcbc', '250'],
|
|
165 \ 'statusline_inactive_bg' : ['#3a3a3a', '237'],
|
|
166 \ 'todo_fg' : ['#ff8700', '208'],
|
|
167 \ 'todo_bg' : ['#1c1c1c', '234'],
|
|
168 \ 'error_fg' : ['#af005f', '125'],
|
|
169 \ 'error_bg' : ['#5f0000', '52'],
|
|
170 \ 'matchparen_bg' : ['#4e4e4e', '239'],
|
|
171 \ 'matchparen_fg' : ['#c6c6c6', '251'],
|
|
172 \ 'visual_fg' : ['#000000', '16'],
|
|
173 \ 'visual_bg' : ['#8787af', '103'],
|
|
174 \ 'folded_fg' : ['#d787ff', '177'],
|
|
175 \ 'folded_bg' : ['#5f005f', '53'],
|
|
176 \ 'wildmenu_fg': ['#1c1c1c', '234'],
|
|
177 \ 'wildmenu_bg': ['#afd700', '148'],
|
|
178 \ 'spellbad': ['#5f0000', '52'],
|
|
179 \ 'spellcap': ['#5f005f', '53'],
|
|
180 \ 'spellrare': ['#005f00', '22'],
|
|
181 \ 'spelllocal': ['#00005f', '17'],
|
|
182 \ 'diffadd_fg': ['#87d700', '112'],
|
|
183 \ 'diffadd_bg': ['#005f00', '22'],
|
|
184 \ 'diffdelete_fg': ['#af005f', '125'],
|
|
185 \ 'diffdelete_bg': ['#5f0000', '52'],
|
|
186 \ 'difftext_fg': ['#5fffff', '87'],
|
|
187 \ 'difftext_bg': ['#008787', '30'],
|
|
188 \ 'diffchange_fg': ['#d0d0d0', '252'],
|
|
189 \ 'diffchange_bg': ['#005f5f', '23'],
|
|
190 \ 'tabline_bg': ['#262626', '235'],
|
|
191 \ 'tabline_active_fg': ['#121212', '233'],
|
|
192 \ 'tabline_active_bg': ['#00afaf', '37'],
|
|
193 \ 'tabline_inactive_fg': ['#bcbcbc', '250'],
|
|
194 \ 'tabline_inactive_bg': ['#585858', '240'],
|
|
195 \ 'buftabline_bg': ['#262626', '235'],
|
|
196 \ 'buftabline_current_fg': ['#121212', '233'],
|
|
197 \ 'buftabline_current_bg': ['#00afaf', '37'],
|
|
198 \ 'buftabline_active_fg': ['#00afaf', '37'],
|
|
199 \ 'buftabline_active_bg': ['#585858', '240'],
|
|
200 \ 'buftabline_inactive_fg': ['#bcbcbc', '250'],
|
|
201 \ 'buftabline_inactive_bg': ['#585858', '240']
|
|
202 \ }
|
|
203 \ }
|
|
204 endfun
|
|
205
|
|
206 " ============================ THEME REGISTER =================================
|
|
207
|
|
208 " Acquire Theme Data: {{{
|
|
209
|
|
210 " Brief:
|
|
211 " Function to get theme information and store in variables for other
|
|
212 " functions to use
|
|
213 "
|
|
214 " Require:
|
|
215 " s:themes <dictionary> collection of all theme palettes
|
|
216 "
|
|
217 " Require Optionally:
|
|
218 " {g:PaperColor_Theme_[s:theme_name]} <dictionary> user custom theme palette
|
|
219 " g:PaperColor_Theme_Options <dictionary> user options
|
|
220 "
|
|
221 " Expose:
|
|
222 " s:theme_name <string> the name of the selected theme
|
|
223 " s:selected_theme <dictionary> the selected theme object (contains palette, etc.)
|
|
224 " s:selected_variant <string> 'light' or 'dark'
|
|
225 " s:palette <dictionary> the palette of selected theme
|
|
226 " s:options <dictionary> user options
|
|
227 fun! s:acquire_theme_data()
|
|
228
|
|
229 " Get theme name: {{{
|
|
230 let s:theme_name = 'default'
|
|
231
|
|
232 if exists("g:PaperColor_Theme") " Users expressed theme preference
|
|
233 let lowercase_theme_name = tolower(g:PaperColor_Theme)
|
|
234
|
|
235 if lowercase_theme_name !=? 'default'
|
|
236 let theme_identifier = 'PaperColor_' . lowercase_theme_name
|
|
237 let autoload_function = theme_identifier . '#register'
|
|
238
|
|
239 call {autoload_function}()
|
|
240
|
|
241 let theme_variable = 'g:' . theme_identifier
|
|
242
|
|
243 if exists(theme_variable)
|
|
244 let s:theme_name = lowercase_theme_name
|
|
245 let s:themes[s:theme_name] = {theme_variable}
|
|
246 endif
|
|
247
|
|
248 endif
|
|
249
|
|
250 endif
|
|
251 " }}}
|
|
252
|
|
253 if s:theme_name ==? 'default'
|
|
254 " Either no other theme is specified or they failed to load
|
|
255 " Defer loading default theme until now
|
|
256 call s:register_default_theme()
|
|
257 endif
|
|
258
|
|
259 let s:selected_theme = s:themes[s:theme_name]
|
|
260
|
|
261 " Get Theme Variant: either dark or light {{{
|
|
262 let s:selected_variant = 'dark'
|
|
263
|
|
264 let s:is_dark=(&background == 'dark')
|
|
265
|
|
266 if s:is_dark
|
|
267 if has_key(s:selected_theme, 'dark')
|
|
268 let s:selected_variant = 'dark'
|
|
269 else " in case the theme only provides the other variant
|
|
270 let s:selected_variant = 'light'
|
|
271 endif
|
|
272
|
|
273 else " is light background
|
|
274 if has_key(s:selected_theme, 'light')
|
|
275 let s:selected_variant = 'light'
|
|
276 else " in case the theme only provides the other variant
|
|
277 let s:selected_variant = 'dark'
|
|
278 endif
|
|
279 endif
|
|
280
|
|
281 let s:palette = s:selected_theme[s:selected_variant].palette
|
|
282
|
|
283 " Systematic User-Config Options: {{{
|
|
284 " Example config in .vimrc
|
|
285 " let g:PaperColor_Theme_Options = {
|
|
286 " \ 'theme': {
|
|
287 " \ 'default': {
|
|
288 " \ 'allow_bold': 1,
|
|
289 " \ 'allow_italic': 0,
|
|
290 " \ 'transparent_background': 1
|
|
291 " \ }
|
|
292 " \ },
|
|
293 " \ 'language': {
|
|
294 " \ 'python': {
|
|
295 " \ 'highlight_builtins' : 1
|
|
296 " \ },
|
|
297 " \ 'c': {
|
|
298 " \ 'highlight_builtins' : 1
|
|
299 " \ },
|
|
300 " \ 'cpp': {
|
|
301 " \ 'highlight_standard_library': 1
|
|
302 " \ }
|
|
303 " \ }
|
|
304 " \ }
|
|
305 "
|
|
306 let s:options = {}
|
|
307
|
|
308
|
|
309 if exists("g:PaperColor_Theme_Options")
|
|
310 let s:options = g:PaperColor_Theme_Options
|
|
311 endif
|
|
312 " }}}
|
|
313
|
|
314 " }}}
|
|
315 endfun
|
|
316
|
|
317
|
|
318 " }}}
|
|
319
|
|
320 " Identify Color Mode: {{{
|
|
321
|
|
322 fun! s:identify_color_mode()
|
|
323 let s:MODE_16_COLOR = 0
|
|
324 let s:MODE_256_COLOR = 1
|
|
325 let s:MODE_GUI_COLOR = 2
|
|
326
|
|
327 if has("gui_running") || has('termguicolors') && &termguicolors || has('nvim') && $NVIM_TUI_ENABLE_TRUE_COLOR
|
|
328 let s:mode = s:MODE_GUI_COLOR
|
|
329 elseif (&t_Co >= 256)
|
|
330 let s:mode = s:MODE_256_COLOR
|
|
331 else
|
|
332 let s:mode = s:MODE_16_COLOR
|
|
333 endif
|
|
334 endfun
|
|
335
|
|
336 " }}}
|
|
337
|
|
338 " ============================ OPTION HANDLER =================================
|
|
339
|
|
340 " Generate Them Option Variables: {{{
|
|
341
|
|
342
|
|
343 fun! s:generate_theme_option_variables()
|
|
344 " 0. All possible theme option names must be registered here
|
|
345 let l:available_theme_options = [
|
|
346 \ 'allow_bold',
|
|
347 \ 'allow_italic',
|
|
348 \ 'transparent_background',
|
|
349 \ ]
|
|
350
|
|
351 " 1. Generate variables and set to default value
|
|
352 for l:option in l:available_theme_options
|
|
353 let s:{'themeOpt_' . l:option} = 0
|
|
354 endfor
|
|
355
|
|
356 let s:themeOpt_override = {} " special case, this has to be a dictionary
|
|
357
|
|
358 " 2. Reassign value to the above variables based on theme settings
|
|
359
|
|
360 " 2.1 In case the theme has top-level options
|
|
361 if has_key(s:selected_theme, 'options')
|
|
362 let l:theme_options = s:selected_theme['options']
|
|
363 for l:opt_name in keys(l:theme_options)
|
|
364 let s:{'themeOpt_' . l:opt_name} = l:theme_options[l:opt_name]
|
|
365 " echo 's:themeOpt_' . l:opt_name . ' = ' . s:{'themeOpt_' . l:opt_name}
|
|
366 endfor
|
|
367 endif
|
|
368
|
|
369 " 2.2 In case the theme has specific variant options
|
|
370 if has_key(s:selected_theme[s:selected_variant], 'options')
|
|
371 let l:theme_options = s:selected_theme[s:selected_variant]['options']
|
|
372 for l:opt_name in keys(l:theme_options)
|
|
373 let s:{'themeOpt_' . l:opt_name} = l:theme_options[l:opt_name]
|
|
374 " echo 's:themeOpt_' . l:opt_name . ' = ' . s:{'themeOpt_' . l:opt_name}
|
|
375 endfor
|
|
376 endif
|
|
377
|
|
378
|
|
379 " 3. Reassign value to the above variables which the user customizes
|
|
380 " Part of user-config options
|
|
381 let s:theme_options = {}
|
|
382 if has_key(s:options, 'theme')
|
|
383 let s:theme_options = s:options['theme']
|
|
384 endif
|
|
385
|
|
386 " 3.1 In case user sets for a theme without specifying which variant
|
|
387 if has_key(s:theme_options, s:theme_name)
|
|
388 let l:theme_options = s:theme_options[s:theme_name]
|
|
389 for l:opt_name in keys(l:theme_options)
|
|
390 let s:{'themeOpt_' . l:opt_name} = l:theme_options[l:opt_name]
|
|
391 " echo 's:themeOpt_' . l:opt_name . ' = ' . s:{'themeOpt_' . l:opt_name}
|
|
392 endfor
|
|
393 endif
|
|
394
|
|
395
|
|
396 " 3.2 In case user sets for a specific variant of a theme
|
|
397
|
|
398 " Create the string that the user might have set for this theme variant
|
|
399 " for example, 'default.dark'
|
|
400 let l:specific_theme_variant = s:theme_name . '.' . s:selected_variant
|
|
401
|
|
402 if has_key(s:theme_options, l:specific_theme_variant)
|
|
403 let l:theme_options = s:theme_options[l:specific_theme_variant]
|
|
404 for l:opt_name in keys(l:theme_options)
|
|
405 let s:{'themeOpt_' . l:opt_name} = l:theme_options[l:opt_name]
|
|
406 " echo 's:themeOpt_' . l:opt_name . ' = ' . s:{'themeOpt_' . l:opt_name}
|
|
407 endfor
|
|
408 endif
|
|
409
|
|
410 endfun
|
|
411 " }}}
|
|
412
|
|
413 " Check If Theme Has Hint: {{{
|
|
414 "
|
|
415 " Brief:
|
|
416 " Function to Check if the selected theme and variant has a hint
|
|
417 "
|
|
418 " Details:
|
|
419 " A hint is a known key that has value 1
|
|
420 " It is not part of theme design but is used for technical purposes
|
|
421 "
|
|
422 " Example:
|
|
423 " If a theme has hint 'NO_CONVERSION', then we can assume that every
|
|
424 " color value is a complete pair, so we don't have to check.
|
|
425
|
|
426 fun! s:theme_has_hint(hint)
|
|
427 return has_key(s:selected_theme[s:selected_variant], a:hint) &&
|
|
428 \ s:selected_theme[s:selected_variant][a:hint] == 1
|
|
429 endfun
|
|
430 " }}}
|
|
431
|
|
432 " Set Overriding Colors: {{{
|
|
433
|
|
434 fun! s:set_overriding_colors()
|
|
435
|
|
436 if s:theme_has_hint('NO_CONVERSION')
|
|
437 " s:convert_colors will not do anything, so we take care of conversion
|
|
438 " for the overriding colors that need to be converted
|
|
439
|
|
440 if s:mode == s:MODE_GUI_COLOR
|
|
441 " if GUI color is not provided, convert from 256 color that must be available
|
|
442 if !empty(s:themeOpt_override)
|
|
443 call s:load_256_to_GUI_converter()
|
|
444 endif
|
|
445
|
|
446 for l:color in keys(s:themeOpt_override)
|
|
447 let l:value = s:themeOpt_override[l:color]
|
|
448 if l:value[0] == ''
|
|
449 let l:value[0] = s:to_HEX[l:value[1]]
|
|
450 endif
|
|
451 let s:palette[l:color] = l:value
|
|
452 endfor
|
|
453
|
|
454 elseif s:mode == s:MODE_256_COLOR
|
|
455 " if 256 color is not provided, convert from GUI color that must be available
|
|
456 if !empty(s:themeOpt_override)
|
|
457 call s:load_GUI_to_256_converter()
|
|
458 endif
|
|
459
|
|
460 for l:color in keys(s:themeOpt_override)
|
|
461 let l:value = s:themeOpt_override[l:color]
|
|
462 if l:value[1] == ''
|
|
463 let l:value[1] = s:to_256(l:value[0])
|
|
464 endif
|
|
465 let s:palette[l:color] = l:value
|
|
466 endfor
|
|
467 endif
|
|
468
|
|
469 else " simply set the colors and let s:convert_colors() take care of conversion
|
|
470
|
|
471 for l:color in keys(s:themeOpt_override)
|
|
472 let s:palette[l:color] = s:themeOpt_override[l:color]
|
|
473 endfor
|
|
474 endif
|
|
475
|
|
476 endfun
|
|
477 " }}}
|
|
478
|
|
479 " Generate Language Option Variables: {{{
|
|
480
|
|
481 " Brief:
|
|
482 " Function to generate language option variables so that there is no need to
|
|
483 " look up from the dictionary every time the option value is checked in the
|
|
484 " function s:apply_syntax_highlightings()
|
|
485 "
|
|
486 " Require:
|
|
487 " s:options <dictionary> user options
|
|
488 "
|
|
489 " Require Optionally:
|
|
490 " g:PaperColor_Theme_Options <dictionary> user option config in .vimrc
|
|
491 "
|
|
492 " Expose:
|
|
493 " s:langOpt_[LANGUAGE]__[OPTION] <any> variables for language options
|
|
494 "
|
|
495 " Example:
|
|
496 " g:PaperColor_Theme_Options has something like this:
|
|
497 " 'language': {
|
|
498 " \ 'python': {
|
|
499 " \ 'highlight_builtins': 1
|
|
500 " \ }
|
|
501 " }
|
|
502 " The following variable will be generated:
|
|
503 " s:langOpt_python__highlight_builtins = 1
|
|
504
|
|
505 fun! s:generate_language_option_variables()
|
|
506 " 0. All possible theme option names must be registered here
|
|
507 let l:available_language_options = [
|
|
508 \ 'c__highlight_builtins',
|
|
509 \ 'cpp__highlight_standard_library',
|
|
510 \ 'python__highlight_builtins'
|
|
511 \ ]
|
|
512
|
|
513 " 1. Generate variables and set to default value
|
|
514 for l:option in l:available_language_options
|
|
515 let s:{'langOpt_' . l:option} = 0
|
|
516 endfor
|
|
517
|
|
518 " Part of user-config options
|
|
519 if has_key(s:options, 'language')
|
|
520 let l:language_options = s:options['language']
|
|
521 " echo l:language_options
|
|
522 for l:lang in keys(l:language_options)
|
|
523 let l:options = l:language_options[l:lang]
|
|
524 " echo l:lang
|
|
525 " echo l:options
|
|
526 for l:option in keys(l:options)
|
|
527 let s:{'langOpt_' . l:lang . '__' . l:option} = l:options[l:option]
|
|
528 " echo 's:langOpt_' . l:lang . '__' . l:option . ' = ' . l:options[l:option]
|
|
529 endfor
|
|
530 endfor
|
|
531
|
|
532 endif
|
|
533
|
|
534 endfun
|
|
535 " }}}
|
|
536
|
|
537 " =========================== COLOR CONVERTER =================================
|
|
538
|
|
539 fun! s:load_GUI_to_256_converter()
|
|
540 " GUI-color To 256-color: {{{
|
|
541 " Returns an approximate grey index for the given grey level
|
|
542 fun! s:grey_number(x)
|
|
543 if &t_Co == 88
|
|
544 if a:x < 23
|
|
545 return 0
|
|
546 elseif a:x < 69
|
|
547 return 1
|
|
548 elseif a:x < 103
|
|
549 return 2
|
|
550 elseif a:x < 127
|
|
551 return 3
|
|
552 elseif a:x < 150
|
|
553 return 4
|
|
554 elseif a:x < 173
|
|
555 return 5
|
|
556 elseif a:x < 196
|
|
557 return 6
|
|
558 elseif a:x < 219
|
|
559 return 7
|
|
560 elseif a:x < 243
|
|
561 return 8
|
|
562 else
|
|
563 return 9
|
|
564 endif
|
|
565 else
|
|
566 if a:x < 14
|
|
567 return 0
|
|
568 else
|
|
569 let l:n = (a:x - 8) / 10
|
|
570 let l:m = (a:x - 8) % 10
|
|
571 if l:m < 5
|
|
572 return l:n
|
|
573 else
|
|
574 return l:n + 1
|
|
575 endif
|
|
576 endif
|
|
577 endif
|
|
578 endfun
|
|
579
|
|
580 " Returns the actual grey level represented by the grey index
|
|
581 fun! s:grey_level(n)
|
|
582 if &t_Co == 88
|
|
583 if a:n == 0
|
|
584 return 0
|
|
585 elseif a:n == 1
|
|
586 return 46
|
|
587 elseif a:n == 2
|
|
588 return 92
|
|
589 elseif a:n == 3
|
|
590 return 115
|
|
591 elseif a:n == 4
|
|
592 return 139
|
|
593 elseif a:n == 5
|
|
594 return 162
|
|
595 elseif a:n == 6
|
|
596 return 185
|
|
597 elseif a:n == 7
|
|
598 return 208
|
|
599 elseif a:n == 8
|
|
600 return 231
|
|
601 else
|
|
602 return 255
|
|
603 endif
|
|
604 else
|
|
605 if a:n == 0
|
|
606 return 0
|
|
607 else
|
|
608 return 8 + (a:n * 10)
|
|
609 endif
|
|
610 endif
|
|
611 endfun
|
|
612
|
|
613 " Returns the palette index for the given grey index
|
|
614 fun! s:grey_colour(n)
|
|
615 if &t_Co == 88
|
|
616 if a:n == 0
|
|
617 return 16
|
|
618 elseif a:n == 9
|
|
619 return 79
|
|
620 else
|
|
621 return 79 + a:n
|
|
622 endif
|
|
623 else
|
|
624 if a:n == 0
|
|
625 return 16
|
|
626 elseif a:n == 25
|
|
627 return 231
|
|
628 else
|
|
629 return 231 + a:n
|
|
630 endif
|
|
631 endif
|
|
632 endfun
|
|
633
|
|
634 " Returns an approximate colour index for the given colour level
|
|
635 fun! s:rgb_number(x)
|
|
636 if &t_Co == 88
|
|
637 if a:x < 69
|
|
638 return 0
|
|
639 elseif a:x < 172
|
|
640 return 1
|
|
641 elseif a:x < 230
|
|
642 return 2
|
|
643 else
|
|
644 return 3
|
|
645 endif
|
|
646 else
|
|
647 if a:x < 75
|
|
648 return 0
|
|
649 else
|
|
650 let l:n = (a:x - 55) / 40
|
|
651 let l:m = (a:x - 55) % 40
|
|
652 if l:m < 20
|
|
653 return l:n
|
|
654 else
|
|
655 return l:n + 1
|
|
656 endif
|
|
657 endif
|
|
658 endif
|
|
659 endfun
|
|
660
|
|
661 " Returns the actual colour level for the given colour index
|
|
662 fun! s:rgb_level(n)
|
|
663 if &t_Co == 88
|
|
664 if a:n == 0
|
|
665 return 0
|
|
666 elseif a:n == 1
|
|
667 return 139
|
|
668 elseif a:n == 2
|
|
669 return 205
|
|
670 else
|
|
671 return 255
|
|
672 endif
|
|
673 else
|
|
674 if a:n == 0
|
|
675 return 0
|
|
676 else
|
|
677 return 55 + (a:n * 40)
|
|
678 endif
|
|
679 endif
|
|
680 endfun
|
|
681
|
|
682 " Returns the palette index for the given R/G/B colour indices
|
|
683 fun! s:rgb_colour(x, y, z)
|
|
684 if &t_Co == 88
|
|
685 return 16 + (a:x * 16) + (a:y * 4) + a:z
|
|
686 else
|
|
687 return 16 + (a:x * 36) + (a:y * 6) + a:z
|
|
688 endif
|
|
689 endfun
|
|
690
|
|
691 " Returns the palette index to approximate the given R/G/B colour levels
|
|
692 fun! s:colour(r, g, b)
|
|
693 " Get the closest grey
|
|
694 let l:gx = s:grey_number(a:r)
|
|
695 let l:gy = s:grey_number(a:g)
|
|
696 let l:gz = s:grey_number(a:b)
|
|
697
|
|
698 " Get the closest colour
|
|
699 let l:x = s:rgb_number(a:r)
|
|
700 let l:y = s:rgb_number(a:g)
|
|
701 let l:z = s:rgb_number(a:b)
|
|
702
|
|
703 if l:gx == l:gy && l:gy == l:gz
|
|
704 " There are two possibilities
|
|
705 let l:dgr = s:grey_level(l:gx) - a:r
|
|
706 let l:dgg = s:grey_level(l:gy) - a:g
|
|
707 let l:dgb = s:grey_level(l:gz) - a:b
|
|
708 let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
|
|
709 let l:dr = s:rgb_level(l:gx) - a:r
|
|
710 let l:dg = s:rgb_level(l:gy) - a:g
|
|
711 let l:db = s:rgb_level(l:gz) - a:b
|
|
712 let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
|
|
713 if l:dgrey < l:drgb
|
|
714 " Use the grey
|
|
715 return s:grey_colour(l:gx)
|
|
716 else
|
|
717 " Use the colour
|
|
718 return s:rgb_colour(l:x, l:y, l:z)
|
|
719 endif
|
|
720 else
|
|
721 " Only one possibility
|
|
722 return s:rgb_colour(l:x, l:y, l:z)
|
|
723 endif
|
|
724 endfun
|
|
725
|
|
726 " Returns the palette index to approximate the '#rrggbb' hex string
|
|
727 fun! s:to_256(rgb)
|
|
728 let l:r = ("0x" . strpart(a:rgb, 1, 2)) + 0
|
|
729 let l:g = ("0x" . strpart(a:rgb, 3, 2)) + 0
|
|
730 let l:b = ("0x" . strpart(a:rgb, 5, 2)) + 0
|
|
731
|
|
732 return s:colour(l:r, l:g, l:b)
|
|
733 endfun
|
|
734
|
|
735
|
|
736
|
|
737 " }}}
|
|
738 endfun
|
|
739
|
|
740 fun! s:load_256_to_GUI_converter()
|
|
741 " 256-color To GUI-color: {{{
|
|
742
|
|
743 """ Xterm 256 color dictionary
|
|
744 " See: http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
|
|
745 "
|
|
746 let s:to_HEX = {
|
|
747 \ '00': '#000000', '01': '#800000', '02': '#008000', '03': '#808000', '04': '#000080',
|
|
748 \ '05': '#800080', '06': '#008080', '07': '#c0c0c0', '08': '#808080', '09': '#ff0000',
|
|
749 \ '10': '#00ff00', '11': '#ffff00', '12': '#0000ff', '13': '#ff00ff', '14': '#00ffff',
|
|
750 \ '15': '#ffffff', '16': '#000000', '17': '#00005f', '18': '#000087', '19': '#0000af',
|
|
751 \ '20': '#0000d7', '21': '#0000ff', '22': '#005f00', '23': '#005f5f', '24': '#005f87',
|
|
752 \ '25': '#005faf', '26': '#005fd7', '27': '#005fff', '28': '#008700', '29': '#00875f',
|
|
753 \ '30': '#008787', '31': '#0087af', '32': '#0087d7', '33': '#0087ff', '34': '#00af00',
|
|
754 \ '35': '#00af5f', '36': '#00af87', '37': '#00afaf', '38': '#00afd7', '39': '#00afff',
|
|
755 \ '40': '#00d700', '41': '#00d75f', '42': '#00d787', '43': '#00d7af', '44': '#00d7d7',
|
|
756 \ '45': '#00d7ff', '46': '#00ff00', '47': '#00ff5f', '48': '#00ff87', '49': '#00ffaf',
|
|
757 \ '50': '#00ffd7', '51': '#00ffff', '52': '#5f0000', '53': '#5f005f', '54': '#5f0087',
|
|
758 \ '55': '#5f00af', '56': '#5f00d7', '57': '#5f00ff', '58': '#5f5f00', '59': '#5f5f5f',
|
|
759 \ '60': '#5f5f87', '61': '#5f5faf', '62': '#5f5fd7', '63': '#5f5fff', '64': '#5f8700',
|
|
760 \ '65': '#5f875f', '66': '#5f8787', '67': '#5f87af', '68': '#5f87d7', '69': '#5f87ff',
|
|
761 \ '70': '#5faf00', '71': '#5faf5f', '72': '#5faf87', '73': '#5fafaf', '74': '#5fafd7',
|
|
762 \ '75': '#5fafff', '76': '#5fd700', '77': '#5fd75f', '78': '#5fd787', '79': '#5fd7af',
|
|
763 \ '80': '#5fd7d7', '81': '#5fd7ff', '82': '#5fff00', '83': '#5fff5f', '84': '#5fff87',
|
|
764 \ '85': '#5fffaf', '86': '#5fffd7', '87': '#5fffff', '88': '#870000', '89': '#87005f',
|
|
765 \ '90': '#870087', '91': '#8700af', '92': '#8700d7', '93': '#8700ff', '94': '#875f00',
|
|
766 \ '95': '#875f5f', '96': '#875f87', '97': '#875faf', '98': '#875fd7', '99': '#875fff',
|
|
767 \ '100': '#878700', '101': '#87875f', '102': '#878787', '103': '#8787af', '104': '#8787d7',
|
|
768 \ '105': '#8787ff', '106': '#87af00', '107': '#87af5f', '108': '#87af87', '109': '#87afaf',
|
|
769 \ '110': '#87afd7', '111': '#87afff', '112': '#87d700', '113': '#87d75f', '114': '#87d787',
|
|
770 \ '115': '#87d7af', '116': '#87d7d7', '117': '#87d7ff', '118': '#87ff00', '119': '#87ff5f',
|
|
771 \ '120': '#87ff87', '121': '#87ffaf', '122': '#87ffd7', '123': '#87ffff', '124': '#af0000',
|
|
772 \ '125': '#af005f', '126': '#af0087', '127': '#af00af', '128': '#af00d7', '129': '#af00ff',
|
|
773 \ '130': '#af5f00', '131': '#af5f5f', '132': '#af5f87', '133': '#af5faf', '134': '#af5fd7',
|
|
774 \ '135': '#af5fff', '136': '#af8700', '137': '#af875f', '138': '#af8787', '139': '#af87af',
|
|
775 \ '140': '#af87d7', '141': '#af87ff', '142': '#afaf00', '143': '#afaf5f', '144': '#afaf87',
|
|
776 \ '145': '#afafaf', '146': '#afafd7', '147': '#afafff', '148': '#afd700', '149': '#afd75f',
|
|
777 \ '150': '#afd787', '151': '#afd7af', '152': '#afd7d7', '153': '#afd7ff', '154': '#afff00',
|
|
778 \ '155': '#afff5f', '156': '#afff87', '157': '#afffaf', '158': '#afffd7', '159': '#afffff',
|
|
779 \ '160': '#d70000', '161': '#d7005f', '162': '#d70087', '163': '#d700af', '164': '#d700d7',
|
|
780 \ '165': '#d700ff', '166': '#d75f00', '167': '#d75f5f', '168': '#d75f87', '169': '#d75faf',
|
|
781 \ '170': '#d75fd7', '171': '#d75fff', '172': '#d78700', '173': '#d7875f', '174': '#d78787',
|
|
782 \ '175': '#d787af', '176': '#d787d7', '177': '#d787ff', '178': '#d7af00', '179': '#d7af5f',
|
|
783 \ '180': '#d7af87', '181': '#d7afaf', '182': '#d7afd7', '183': '#d7afff', '184': '#d7d700',
|
|
784 \ '185': '#d7d75f', '186': '#d7d787', '187': '#d7d7af', '188': '#d7d7d7', '189': '#d7d7ff',
|
|
785 \ '190': '#d7ff00', '191': '#d7ff5f', '192': '#d7ff87', '193': '#d7ffaf', '194': '#d7ffd7',
|
|
786 \ '195': '#d7ffff', '196': '#ff0000', '197': '#ff005f', '198': '#ff0087', '199': '#ff00af',
|
|
787 \ '200': '#ff00d7', '201': '#ff00ff', '202': '#ff5f00', '203': '#ff5f5f', '204': '#ff5f87',
|
|
788 \ '205': '#ff5faf', '206': '#ff5fd7', '207': '#ff5fff', '208': '#ff8700', '209': '#ff875f',
|
|
789 \ '210': '#ff8787', '211': '#ff87af', '212': '#ff87d7', '213': '#ff87ff', '214': '#ffaf00',
|
|
790 \ '215': '#ffaf5f', '216': '#ffaf87', '217': '#ffafaf', '218': '#ffafd7', '219': '#ffafff',
|
|
791 \ '220': '#ffd700', '221': '#ffd75f', '222': '#ffd787', '223': '#ffd7af', '224': '#ffd7d7',
|
|
792 \ '225': '#ffd7ff', '226': '#ffff00', '227': '#ffff5f', '228': '#ffff87', '229': '#ffffaf',
|
|
793 \ '230': '#ffffd7', '231': '#ffffff', '232': '#080808', '233': '#121212', '234': '#1c1c1c',
|
|
794 \ '235': '#262626', '236': '#303030', '237': '#3a3a3a', '238': '#444444', '239': '#4e4e4e',
|
|
795 \ '240': '#585858', '241': '#626262', '242': '#6c6c6c', '243': '#767676', '244': '#808080',
|
|
796 \ '245': '#8a8a8a', '246': '#949494', '247': '#9e9e9e', '248': '#a8a8a8', '249': '#b2b2b2',
|
|
797 \ '250': '#bcbcbc', '251': '#c6c6c6', '252': '#d0d0d0', '253': '#dadada', '254': '#e4e4e4',
|
|
798 \ '255': '#eeeeee' }
|
|
799
|
|
800 " }}}
|
|
801 endfun
|
|
802
|
|
803 " ========================== ENVIRONMENT ADAPTER ==============================
|
|
804
|
|
805 " Set Format Attributes: {{{
|
|
806
|
|
807 fun! s:set_format_attributes()
|
|
808 " These are the default
|
|
809 if s:mode == s:MODE_GUI_COLOR
|
|
810 let s:ft_bold = " cterm=bold gui=bold "
|
|
811 let s:ft_none = " cterm=none gui=none "
|
|
812 let s:ft_reverse = " cterm=reverse gui=reverse "
|
|
813 let s:ft_italic = " cterm=italic gui=italic "
|
|
814 let s:ft_italic_bold = " cterm=italic,bold gui=italic,bold "
|
|
815 elseif s:mode == s:MODE_256_COLOR
|
|
816 let s:ft_bold = " cterm=bold "
|
|
817 let s:ft_none = " cterm=none "
|
|
818 let s:ft_reverse = " cterm=reverse "
|
|
819 let s:ft_italic = " cterm=italic "
|
|
820 let s:ft_italic_bold = " cterm=italic,bold "
|
|
821 else
|
|
822 let s:ft_bold = ""
|
|
823 let s:ft_none = " cterm=none "
|
|
824 let s:ft_reverse = " cterm=reverse "
|
|
825 let s:ft_italic = ""
|
|
826 let s:ft_italic_bold = ""
|
|
827 endif
|
|
828
|
|
829 " Unless instructed otherwise either by theme setting or user overriding
|
|
830
|
|
831 if s:themeOpt_allow_bold == 0
|
|
832 let s:ft_bold = ""
|
|
833 endif
|
|
834 if s:themeOpt_allow_italic == 0
|
|
835 let s:ft_italic = ""
|
|
836 let s:ft_italic_bold = s:ft_bold
|
|
837 endif
|
|
838
|
|
839 endfun
|
|
840
|
|
841 " }}}
|
|
842
|
|
843 " Convert Colors If Needed: {{{
|
|
844 fun! s:convert_colors()
|
|
845 if s:theme_has_hint('NO_CONVERSION')
|
|
846 return
|
|
847 endif
|
|
848
|
|
849 if s:mode == s:MODE_GUI_COLOR
|
|
850 " if GUI color is not provided, convert from 256 color that must be available
|
|
851 call s:load_256_to_GUI_converter()
|
|
852
|
|
853 for l:color in keys(s:palette)
|
|
854 let l:value = s:palette[l:color]
|
|
855 if l:value[0] == ''
|
|
856 let l:value[0] = s:to_HEX[l:value[1]]
|
|
857 endif
|
|
858 let s:palette[l:color] = l:value
|
|
859 endfor
|
|
860
|
|
861 elseif s:mode == s:MODE_256_COLOR
|
|
862 " if 256 color is not provided, convert from GUI color that must be available
|
|
863 call s:load_GUI_to_256_converter()
|
|
864
|
|
865 for l:color in keys(s:palette)
|
|
866 let l:value = s:palette[l:color]
|
|
867 if l:value[1] == ''
|
|
868 let l:value[1] = s:to_256(l:value[0])
|
|
869 endif
|
|
870 let s:palette[l:color] = l:value
|
|
871 endfor
|
|
872 endif
|
|
873 " otherwise use the terminal colors and none of the theme colors are used
|
|
874 endfun
|
|
875
|
|
876 " }}}
|
|
877
|
|
878 " ============================ COLOR POPULARIZER ===============================
|
|
879
|
|
880 " Set Color Variables: {{{
|
|
881 fun! s:set_color_variables()
|
|
882
|
|
883 " Helper: {{{
|
|
884 " -------
|
|
885 " Function to dynamically generate variables that store the color strings
|
|
886 " for setting highlighting. Each color name will have 2 variables with prefix
|
|
887 " s:fg_ and s:bg_. For example:
|
|
888 " if a:color_name is 'Normal' and a:color_value is ['#000000', '0', 'Black'],
|
|
889 " the following 2 variables will be created:
|
|
890 " s:fg_Normal that stores the string ' guifg=#000000 '
|
|
891 " s:bg_Normal that stores the string ' guibg=#000000 '
|
|
892 " Depending on the color mode, ctermfg and ctermbg will be either 0 or Black
|
|
893 "
|
|
894 " Rationale:
|
|
895 " The whole purpose is for speed. We generate these ahead of time so that we
|
|
896 " don't have to do look up or do any if-branch when we set the highlightings.
|
|
897 "
|
|
898 " Furthermore, multiple function definitions for each mode actually reduces
|
|
899 " the need for multiple if-branches inside a single function. This is not
|
|
900 " pretty, but Vim Script is slow, so reducing if-branches in function that is
|
|
901 " often called helps speeding things up quite a bit. Think of this like macro.
|
|
902 "
|
|
903 " If you are familiar with the old code base (v0.9 and ealier), this way of
|
|
904 " generate variables dramatically reduces the loading speed.
|
|
905 " None of previous optimization tricks gets anywhere near this.
|
|
906 if s:mode == s:MODE_GUI_COLOR
|
|
907 fun! s:create_color_variables(color_name, rich_color, term_color)
|
|
908 let {'s:fg_' . a:color_name} = ' guifg=' . a:rich_color[0] . ' '
|
|
909 let {'s:bg_' . a:color_name} = ' guibg=' . a:rich_color[0] . ' '
|
|
910 let {'s:sp_' . a:color_name} = ' guisp=' . a:rich_color[0] . ' '
|
|
911 endfun
|
|
912 elseif s:mode == s:MODE_256_COLOR
|
|
913 fun! s:create_color_variables(color_name, rich_color, term_color)
|
|
914 let {'s:fg_' . a:color_name} = ' ctermfg=' . a:rich_color[1] . ' '
|
|
915 let {'s:bg_' . a:color_name} = ' ctermbg=' . a:rich_color[1] . ' '
|
|
916 let {'s:sp_' . a:color_name} = ''
|
|
917 endfun
|
|
918 else
|
|
919 fun! s:create_color_variables(color_name, rich_color, term_color)
|
|
920 let {'s:fg_' . a:color_name} = ' ctermfg=' . a:term_color . ' '
|
|
921 let {'s:bg_' . a:color_name} = ' ctermbg=' . a:term_color . ' '
|
|
922 let {'s:sp_' . a:color_name} = ''
|
|
923 endfun
|
|
924 endif
|
|
925 " }}}
|
|
926
|
|
927 " Color value format: Array [<GUI COLOR/HEX >, <256-Base>, <16-Base>]
|
|
928 " 16-Base is terminal's native color palette that can be alternated through
|
|
929 " the terminal settings. The 16-color names are according to `:h cterm-colors`
|
|
930
|
|
931 " BASIC COLORS:
|
|
932 " color00-15 are required by all themes.
|
|
933 " These are also how the terminal color palette for the target theme should be.
|
|
934 " See README for theme design guideline
|
|
935 "
|
|
936 " An example format of the below variable's value: ['#262626', '234', 'Black']
|
|
937 " Where the 1st value is HEX color for GUI Vim, 2nd value is for 256-color terminal,
|
|
938 " and the color name on the right is for 16-color terminal (the actual terminal colors
|
|
939 " can be different from what the color names suggest). See :h cterm-colors
|
|
940 "
|
|
941 " Depending on the provided color palette and current Vim, the 1st and 2nd
|
|
942 " parameter might not exist, for example, on 16-color terminal, the variables below
|
|
943 " only store the color names to use the terminal color palette which is the only
|
|
944 " thing available therefore no need for GUI-color or 256-color.
|
|
945
|
|
946 let color00 = get(s:palette, 'color00')
|
|
947 let color01 = get(s:palette, 'color01')
|
|
948 let color02 = get(s:palette, 'color02')
|
|
949 let color03 = get(s:palette, 'color03')
|
|
950 let color04 = get(s:palette, 'color04')
|
|
951 let color05 = get(s:palette, 'color05')
|
|
952 let color06 = get(s:palette, 'color06')
|
|
953 let color07 = get(s:palette, 'color07')
|
|
954 let color08 = get(s:palette, 'color08')
|
|
955 let color09 = get(s:palette, 'color09')
|
|
956 let color10 = get(s:palette, 'color10')
|
|
957 let color11 = get(s:palette, 'color11')
|
|
958 let color12 = get(s:palette, 'color12')
|
|
959 let color13 = get(s:palette, 'color13')
|
|
960 let color14 = get(s:palette, 'color14')
|
|
961 let color15 = get(s:palette, 'color15')
|
|
962
|
|
963 call s:create_color_variables('background', color00 , 'Black')
|
|
964 call s:create_color_variables('negative', color01 , 'DarkRed')
|
|
965 call s:create_color_variables('positive', color02 , 'DarkGreen')
|
|
966 call s:create_color_variables('olive', color03 , 'DarkYellow') " string
|
|
967 call s:create_color_variables('neutral', color04 , 'DarkBlue')
|
|
968 call s:create_color_variables('comment', color05 , 'DarkMagenta')
|
|
969 call s:create_color_variables('navy', color06 , 'DarkCyan') " storageclass
|
|
970 call s:create_color_variables('foreground', color07 , 'LightGray')
|
|
971
|
|
972 call s:create_color_variables('nontext', color08 , 'DarkGray')
|
|
973 call s:create_color_variables('red', color09 , 'LightRed') " import / try/catch
|
|
974 call s:create_color_variables('pink', color10 , 'LightGreen') " statement, type
|
|
975 call s:create_color_variables('purple', color11 , 'LightYellow') " if / conditional
|
|
976 call s:create_color_variables('accent', color12 , 'LightBlue')
|
|
977 call s:create_color_variables('orange', color13 , 'LightMagenta') " number
|
|
978 call s:create_color_variables('blue', color14 , 'LightCyan') " other keyword
|
|
979 call s:create_color_variables('highlight', color15 , 'White')
|
|
980
|
|
981 " Note: special case for FoldColumn group. I want to get rid of this case.
|
|
982 call s:create_color_variables('transparent', [color00[0], 'none'], 'none')
|
|
983
|
|
984 " EXTENDED COLORS:
|
|
985 " From here on, all colors are optional and must have default values (3rd parameter of the
|
|
986 " `get` command) that point to the above basic colors in case the target theme doesn't
|
|
987 " provide the extended colors. The default values should be reasonably sensible.
|
|
988 " The terminal color must be provided also.
|
|
989
|
|
990 call s:create_color_variables('aqua', get(s:palette, 'color16', color14) , 'LightCyan')
|
|
991 call s:create_color_variables('green', get(s:palette, 'color17', color13) , 'LightMagenta')
|
|
992 call s:create_color_variables('wine', get(s:palette, 'color18', color11) , 'LightYellow')
|
|
993
|
|
994 " LineNumber: when set number
|
|
995 call s:create_color_variables('linenumber_fg', get(s:palette, 'linenumber_fg', color08) , 'DarkGray')
|
|
996 call s:create_color_variables('linenumber_bg', get(s:palette, 'linenumber_bg', color00) , 'Black')
|
|
997
|
|
998 " Vertical Split: when there are more than 1 window side by side, ex: <C-W><C-V>
|
|
999 call s:create_color_variables('vertsplit_fg', get(s:palette, 'vertsplit_fg', color15) , 'White')
|
|
1000 call s:create_color_variables('vertsplit_bg', get(s:palette, 'vertsplit_bg', color00) , 'Black')
|
|
1001
|
|
1002 " Statusline: when set status=2
|
|
1003 call s:create_color_variables('statusline_active_fg', get(s:palette, 'statusline_active_fg', color00) , 'Black')
|
|
1004 call s:create_color_variables('statusline_active_bg', get(s:palette, 'statusline_active_bg', color15) , 'White')
|
|
1005 call s:create_color_variables('statusline_inactive_fg', get(s:palette, 'statusline_inactive_fg', color07) , 'LightGray')
|
|
1006 call s:create_color_variables('statusline_inactive_bg', get(s:palette, 'statusline_inactive_bg', color08) , 'DarkGray')
|
|
1007
|
|
1008
|
|
1009 " Cursor: in normal mode
|
|
1010 call s:create_color_variables('cursor_fg', get(s:palette, 'cursor_fg', color00) , 'Black')
|
|
1011 call s:create_color_variables('cursor_bg', get(s:palette, 'cursor_bg', color07) , 'LightGray')
|
|
1012
|
|
1013 call s:create_color_variables('cursorline', get(s:palette, 'cursorline', color00) , 'Black')
|
|
1014
|
|
1015 " CursorColumn: when set cursorcolumn
|
|
1016 call s:create_color_variables('cursorcolumn', get(s:palette, 'cursorcolumn', color00) , 'Black')
|
|
1017
|
|
1018 " CursorLine Number: when set cursorline number
|
|
1019 call s:create_color_variables('cursorlinenr_fg', get(s:palette, 'cursorlinenr_fg', color13) , 'LightMagenta')
|
|
1020 call s:create_color_variables('cursorlinenr_bg', get(s:palette, 'cursorlinenr_bg', color00) , 'Black')
|
|
1021
|
|
1022 " Popup Menu: when <C-X><C-N> for autocomplete
|
|
1023 call s:create_color_variables('popupmenu_fg', get(s:palette, 'popupmenu_fg', color07) , 'LightGray')
|
|
1024 call s:create_color_variables('popupmenu_bg', get(s:palette, 'popupmenu_bg', color08) , 'DarkGray') " TODO: double check this, might resolve an issue
|
|
1025
|
|
1026 " Search: ex: when * on a word
|
|
1027 call s:create_color_variables('search_fg', get(s:palette, 'search_fg', color00) , 'Black')
|
|
1028 call s:create_color_variables('search_bg', get(s:palette, 'search_bg', color15) , 'Yellow')
|
|
1029
|
|
1030 " Todo: ex: TODO
|
|
1031 call s:create_color_variables('todo_fg', get(s:palette, 'todo_fg', color05) , 'LightYellow')
|
|
1032 call s:create_color_variables('todo_bg', get(s:palette, 'todo_bg', color00) , 'Black')
|
|
1033
|
|
1034 " Error: ex: turn spell on and have invalid words
|
|
1035 call s:create_color_variables('error_fg', get(s:palette, 'error_fg', color01) , 'DarkRed')
|
|
1036 call s:create_color_variables('error_bg', get(s:palette, 'error_bg', color00) , 'Black')
|
|
1037
|
|
1038 " Match Parenthesis: selecting an opening/closing pair and the other one will be highlighted
|
|
1039 call s:create_color_variables('matchparen_fg', get(s:palette, 'matchparen_fg', color00) , 'LightMagenta')
|
|
1040 call s:create_color_variables('matchparen_bg', get(s:palette, 'matchparen_bg', color05) , 'Black')
|
|
1041
|
|
1042 " Visual:
|
|
1043 call s:create_color_variables('visual_fg', get(s:palette, 'visual_fg', color08) , 'Black')
|
|
1044 call s:create_color_variables('visual_bg', get(s:palette, 'visual_bg', color07) , 'White')
|
|
1045
|
|
1046 " Folded:
|
|
1047 call s:create_color_variables('folded_fg', get(s:palette, 'folded_fg', color00) , 'Black')
|
|
1048 call s:create_color_variables('folded_bg', get(s:palette, 'folded_bg', color05) , 'DarkYellow')
|
|
1049
|
|
1050 " WildMenu: Autocomplete command, ex: :color <tab><tab>
|
|
1051 call s:create_color_variables('wildmenu_fg', get(s:palette, 'wildmenu_fg', color00) , 'Black')
|
|
1052 call s:create_color_variables('wildmenu_bg', get(s:palette, 'wildmenu_bg', color06) , 'LightGray')
|
|
1053
|
|
1054 " Spelling: when spell on and there are spelling problems like this for example: papercolor. a vim color scheme
|
|
1055 call s:create_color_variables('spellbad', get(s:palette, 'spellbad', color04) , 'DarkRed')
|
|
1056 call s:create_color_variables('spellcap', get(s:palette, 'spellcap', color05) , 'DarkMagenta')
|
|
1057 call s:create_color_variables('spellrare', get(s:palette, 'spellrare', color06) , 'DarkYellow')
|
|
1058 call s:create_color_variables('spelllocal', get(s:palette, 'spelllocal', color01) , 'DarkBlue')
|
|
1059
|
|
1060 " Diff:
|
|
1061 call s:create_color_variables('diffadd_fg', get(s:palette, 'diffadd_fg', color00) , 'Black')
|
|
1062 call s:create_color_variables('diffadd_bg', get(s:palette, 'diffadd_bg', color02) , 'DarkGreen')
|
|
1063
|
|
1064 call s:create_color_variables('diffdelete_fg', get(s:palette, 'diffdelete_fg', color00) , 'Black')
|
|
1065 call s:create_color_variables('diffdelete_bg', get(s:palette, 'diffdelete_bg', color04) , 'DarkRed')
|
|
1066
|
|
1067 call s:create_color_variables('difftext_fg', get(s:palette, 'difftext_fg', color00) , 'Black')
|
|
1068 call s:create_color_variables('difftext_bg', get(s:palette, 'difftext_bg', color06) , 'DarkYellow')
|
|
1069
|
|
1070 call s:create_color_variables('diffchange_fg', get(s:palette, 'diffchange_fg', color00) , 'Black')
|
|
1071 call s:create_color_variables('diffchange_bg', get(s:palette, 'diffchange_bg', color14) , 'LightYellow')
|
|
1072
|
|
1073 " Tabline: when having tabs, ex: :tabnew
|
|
1074 call s:create_color_variables('tabline_bg', get(s:palette, 'tabline_bg', color00) , 'Black')
|
|
1075 call s:create_color_variables('tabline_active_fg', get(s:palette, 'tabline_active_fg', color07) , 'LightGray')
|
|
1076 call s:create_color_variables('tabline_active_bg', get(s:palette, 'tabline_active_bg', color00) , 'Black')
|
|
1077 call s:create_color_variables('tabline_inactive_fg', get(s:palette, 'tabline_inactive_fg', color07) , 'Black')
|
|
1078 call s:create_color_variables('tabline_inactive_bg', get(s:palette, 'tabline_inactive_bg', color08) , 'DarkMagenta')
|
|
1079
|
|
1080 " Plugin: BufTabLine https://github.com/ap/vim-buftabline
|
|
1081 call s:create_color_variables('buftabline_bg', get(s:palette, 'buftabline_bg', color00) , 'Black')
|
|
1082 call s:create_color_variables('buftabline_current_fg', get(s:palette, 'buftabline_current_fg', color07) , 'LightGray')
|
|
1083 call s:create_color_variables('buftabline_current_bg', get(s:palette, 'buftabline_current_bg', color05) , 'DarkMagenta')
|
|
1084 call s:create_color_variables('buftabline_active_fg', get(s:palette, 'buftabline_active_fg', color07) , 'LightGray')
|
|
1085 call s:create_color_variables('buftabline_active_bg', get(s:palette, 'buftabline_active_bg', color12) , 'LightBlue')
|
|
1086 call s:create_color_variables('buftabline_inactive_fg', get(s:palette, 'buftabline_inactive_fg', color07) , 'LightGray')
|
|
1087 call s:create_color_variables('buftabline_inactive_bg', get(s:palette, 'buftabline_inactive_bg', color00) , 'Black')
|
|
1088
|
|
1089 " Neovim terminal colors https://neovim.io/doc/user/nvim_terminal_emulator.html#nvim-terminal-emulator-configuration
|
|
1090 " TODO: Fix this
|
|
1091 let g:terminal_color_0 = color00[0]
|
|
1092 let g:terminal_color_1 = color01[0]
|
|
1093 let g:terminal_color_2 = color02[0]
|
|
1094 let g:terminal_color_3 = color03[0]
|
|
1095 let g:terminal_color_4 = color04[0]
|
|
1096 let g:terminal_color_5 = color05[0]
|
|
1097 let g:terminal_color_6 = color06[0]
|
|
1098 let g:terminal_color_7 = color07[0]
|
|
1099 let g:terminal_color_8 = color08[0]
|
|
1100 let g:terminal_color_9 = color09[0]
|
|
1101 let g:terminal_color_10 = color10[0]
|
|
1102 let g:terminal_color_11 = color11[0]
|
|
1103 let g:terminal_color_12 = color12[0]
|
|
1104 let g:terminal_color_13 = color13[0]
|
|
1105 let g:terminal_color_14 = color14[0]
|
|
1106 let g:terminal_color_15 = color15[0]
|
|
1107
|
|
1108 " Vim 8's :terminal buffer ANSI colors
|
|
1109 if has('terminal')
|
|
1110 let g:terminal_ansi_colors = [color00[0], color01[0], color02[0], color03[0],
|
|
1111 \ color04[0], color05[0], color06[0], color07[0], color08[0], color09[0],
|
|
1112 \ color10[0], color11[0], color12[0], color13[0], color14[0], color15[0]]
|
|
1113 endif
|
|
1114
|
|
1115 endfun
|
|
1116 " }}}
|
|
1117
|
|
1118 " Apply Syntax Highlightings: {{{
|
|
1119
|
|
1120 fun! s:apply_syntax_highlightings()
|
|
1121
|
|
1122 if s:themeOpt_transparent_background
|
|
1123 exec 'hi Normal' . s:fg_foreground
|
|
1124 " Switching between dark & light variant through `set background`
|
|
1125 " NOTE: Handle background switching right after `Normal` group because of
|
|
1126 " God-know-why reason. Not doing this way had caused issue before
|
|
1127 if s:is_dark " DARK VARIANT
|
|
1128 set background=dark
|
|
1129 else " LIGHT VARIANT
|
|
1130 set background=light
|
|
1131 endif
|
|
1132
|
|
1133 exec 'hi NonText' . s:fg_nontext
|
|
1134 exec 'hi LineNr' . s:fg_linenumber_fg
|
|
1135 exec 'hi Conceal' . s:fg_linenumber_fg
|
|
1136 exec 'hi VertSplit' . s:fg_vertsplit_fg . s:ft_none
|
|
1137 exec 'hi FoldColumn' . s:fg_folded_fg . s:bg_transparent . s:ft_none
|
|
1138 else
|
|
1139 exec 'hi Normal' . s:fg_foreground . s:bg_background
|
|
1140 " Switching between dark & light variant through `set background`
|
|
1141 if s:is_dark " DARK VARIANT
|
|
1142 set background=dark
|
|
1143 exec 'hi EndOfBuffer' . s:fg_cursor_fg . s:ft_none
|
|
1144 else " LIGHT VARIANT
|
|
1145 set background=light
|
|
1146 endif
|
|
1147
|
|
1148 exec 'hi NonText' . s:fg_nontext . s:bg_background
|
|
1149 exec 'hi LineNr' . s:fg_linenumber_fg . s:bg_linenumber_bg
|
|
1150 exec 'hi Conceal' . s:fg_linenumber_fg . s:bg_linenumber_bg
|
|
1151 exec 'hi VertSplit' . s:fg_vertsplit_bg . s:bg_vertsplit_fg
|
|
1152 exec 'hi FoldColumn' . s:fg_folded_fg . s:bg_background . s:ft_none
|
|
1153 endif
|
|
1154
|
|
1155 exec 'hi Cursor' . s:fg_cursor_fg . s:bg_cursor_bg
|
|
1156 exec 'hi SpecialKey' . s:fg_nontext
|
|
1157 exec 'hi Search' . s:fg_search_fg . s:bg_search_bg
|
|
1158 exec 'hi StatusLine' . s:fg_statusline_active_bg . s:bg_statusline_active_fg
|
|
1159 exec 'hi StatusLineNC' . s:fg_statusline_inactive_bg . s:bg_statusline_inactive_fg
|
|
1160 exec 'hi StatusLineTerm' . s:fg_statusline_active_bg . s:bg_statusline_active_fg
|
|
1161 exec 'hi StatusLineTermNC' . s:fg_statusline_inactive_bg . s:bg_statusline_inactive_fg
|
|
1162 exec 'hi Visual' . s:fg_visual_fg . s:bg_visual_bg
|
|
1163 exec 'hi Directory' . s:fg_blue
|
|
1164 exec 'hi ModeMsg' . s:fg_olive
|
|
1165 exec 'hi MoreMsg' . s:fg_olive
|
|
1166 exec 'hi Question' . s:fg_olive
|
|
1167 exec 'hi WarningMsg' . s:fg_pink
|
|
1168 exec 'hi MatchParen' . s:fg_matchparen_fg . s:bg_matchparen_bg
|
|
1169 exec 'hi Folded' . s:fg_folded_fg . s:bg_folded_bg
|
|
1170 exec 'hi WildMenu' . s:fg_wildmenu_fg . s:bg_wildmenu_bg . s:ft_bold
|
|
1171
|
|
1172 if version >= 700
|
|
1173 exec 'hi CursorLine' . s:bg_cursorline . s:ft_none
|
|
1174 if s:mode == s:MODE_16_COLOR
|
|
1175 exec 'hi CursorLineNr' . s:fg_cursorlinenr_fg . s:bg_cursorlinenr_bg
|
|
1176 else
|
|
1177 exec 'hi CursorLineNr' . s:fg_cursorlinenr_fg . s:bg_cursorlinenr_bg . s:ft_none
|
|
1178 endif
|
|
1179 exec 'hi CursorColumn' . s:bg_cursorcolumn . s:ft_none
|
|
1180 exec 'hi PMenu' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_none
|
|
1181 exec 'hi PMenuSel' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_reverse
|
|
1182 if s:themeOpt_transparent_background
|
|
1183 exec 'hi SignColumn' . s:fg_green . s:ft_none
|
|
1184 else
|
|
1185 exec 'hi SignColumn' . s:fg_green . s:bg_background . s:ft_none
|
|
1186 endif
|
|
1187 end
|
|
1188 if version >= 703
|
|
1189 exec 'hi ColorColumn' . s:bg_cursorcolumn . s:ft_none
|
|
1190 end
|
|
1191
|
|
1192 exec 'hi TabLine' . s:fg_tabline_inactive_fg . s:bg_tabline_inactive_bg . s:ft_none
|
|
1193 exec 'hi TabLineFill' . s:fg_tabline_bg . s:bg_tabline_bg . s:ft_none
|
|
1194 exec 'hi TabLineSel' . s:fg_tabline_active_fg . s:bg_tabline_active_bg . s:ft_none
|
|
1195
|
|
1196 exec 'hi BufTabLineCurrent' . s:fg_buftabline_current_fg . s:bg_buftabline_current_bg . s:ft_none
|
|
1197 exec 'hi BufTabLineActive' . s:fg_buftabline_active_fg . s:bg_buftabline_active_bg . s:ft_none
|
|
1198 exec 'hi BufTabLineHidden' . s:fg_buftabline_inactive_fg . s:bg_buftabline_inactive_bg . s:ft_none
|
|
1199 exec 'hi BufTabLineFill' . s:bg_buftabline_bg . s:ft_none
|
|
1200
|
|
1201 " Standard Group Highlighting:
|
|
1202 exec 'hi Comment' . s:fg_comment . s:ft_italic
|
|
1203
|
|
1204 exec 'hi Constant' . s:fg_orange
|
|
1205 exec 'hi String' . s:fg_olive
|
|
1206 exec 'hi Character' . s:fg_olive
|
|
1207 exec 'hi Number' . s:fg_orange
|
|
1208 exec 'hi Boolean' . s:fg_green . s:ft_bold
|
|
1209 exec 'hi Float' . s:fg_orange
|
|
1210
|
|
1211 exec 'hi Identifier' . s:fg_navy
|
|
1212 exec 'hi Function' . s:fg_foreground
|
|
1213
|
|
1214 exec 'hi Statement' . s:fg_pink . s:ft_none
|
|
1215 exec 'hi Conditional' . s:fg_purple . s:ft_bold
|
|
1216 exec 'hi Repeat' . s:fg_purple . s:ft_bold
|
|
1217 exec 'hi Label' . s:fg_blue
|
|
1218 exec 'hi Operator' . s:fg_aqua . s:ft_none
|
|
1219 exec 'hi Keyword' . s:fg_blue
|
|
1220 exec 'hi Exception' . s:fg_red
|
|
1221
|
|
1222 exec 'hi PreProc' . s:fg_blue
|
|
1223 exec 'hi Include' . s:fg_red
|
|
1224 exec 'hi Define' . s:fg_blue
|
|
1225 exec 'hi Macro' . s:fg_blue
|
|
1226 exec 'hi PreCondit' . s:fg_aqua
|
|
1227
|
|
1228 exec 'hi Type' . s:fg_pink . s:ft_bold
|
|
1229 exec 'hi StorageClass' . s:fg_navy . s:ft_bold
|
|
1230 exec 'hi Structure' . s:fg_blue . s:ft_bold
|
|
1231 exec 'hi Typedef' . s:fg_pink . s:ft_bold
|
|
1232
|
|
1233 exec 'hi Special' . s:fg_foreground
|
|
1234 exec 'hi SpecialChar' . s:fg_foreground
|
|
1235 exec 'hi Tag' . s:fg_green
|
|
1236 exec 'hi Delimiter' . s:fg_aqua
|
|
1237 exec 'hi SpecialComment' . s:fg_comment . s:ft_bold
|
|
1238 exec 'hi Debug' . s:fg_orange
|
|
1239
|
|
1240 exec 'hi Error' . s:fg_error_fg . s:bg_error_bg
|
|
1241 exec 'hi Todo' . s:fg_todo_fg . s:bg_todo_bg . s:ft_bold
|
|
1242
|
|
1243 exec 'hi Title' . s:fg_comment
|
|
1244 exec 'hi Global' . s:fg_blue
|
|
1245
|
|
1246 " Neovim (LSP) diagnostics
|
|
1247 if has('nvim')
|
|
1248 exec 'hi LspDiagnosticsDefaultError' . s:fg_error_fg . s:bg_error_bg
|
|
1249 exec 'hi LspDiagnosticsDefaultWarning' . s:fg_todo_fg . s:bg_todo_bg . s:ft_bold
|
|
1250 exec 'hi LspDiagnosticsDefaultInformation' . s:fg_todo_fg . s:bg_todo_bg . s:ft_bold
|
|
1251 exec 'hi LspDiagnosticsDefaultHint' . s:fg_todo_fg . s:bg_todo_bg . s:ft_bold
|
|
1252
|
|
1253 exec 'hi LspDiagnosticsUnderlineError cterm=undercurl gui=undercurl' . s:sp_error_fg
|
|
1254 exec 'hi LspDiagnosticsUnderlineWarning cterm=undercurl gui=undercurl' . s:sp_todo_fg
|
|
1255 exec 'hi LspDiagnosticsUnderlineInformation cterm=undercurl gui=undercurl' . s:sp_todo_fg
|
|
1256 exec 'hi LspDiagnosticsUnderlineHint cterm=undercurl gui=undercurl' . s:sp_todo_fg
|
|
1257
|
|
1258 hi! link DiagnosticError LspDiagnosticsDefaultError
|
|
1259 hi! link DiagnosticWarn LspDiagnosticsDefaultWarning
|
|
1260 hi! link DiagnosticInfo LspDiagnosticsDefaultInformation
|
|
1261 hi! link DiagnosticHint LspDiagnosticsDefaultHint
|
|
1262
|
|
1263 hi! link DiagnosticUnderlineError LspDiagnosticsUnderlineError
|
|
1264 hi! link DiagnosticUnderlineWarn LspDiagnosticsUnderlineWarning
|
|
1265 hi! link DiagnosticUnderlineInfo LspDiagnosticsUnderlineInformation
|
|
1266 hi! link DiagnosticUnderlineHint LspDiagnosticsUnderlineHint
|
|
1267 endif
|
|
1268
|
|
1269 " Extension {{{
|
|
1270 " VimL Highlighting
|
|
1271 exec 'hi vimCommand' . s:fg_pink
|
|
1272 exec 'hi vimVar' . s:fg_navy
|
|
1273 exec 'hi vimFuncKey' . s:fg_pink
|
|
1274 exec 'hi vimFunction' . s:fg_blue . s:ft_bold
|
|
1275 exec 'hi vimNotFunc' . s:fg_pink
|
|
1276 exec 'hi vimMap' . s:fg_red
|
|
1277 exec 'hi vimAutoEvent' . s:fg_aqua . s:ft_bold
|
|
1278 exec 'hi vimMapModKey' . s:fg_aqua
|
|
1279 exec 'hi vimFuncName' . s:fg_purple
|
|
1280 exec 'hi vimIsCommand' . s:fg_foreground
|
|
1281 exec 'hi vimFuncVar' . s:fg_aqua
|
|
1282 exec 'hi vimLet' . s:fg_red
|
|
1283 exec 'hi vimContinue' . s:fg_aqua
|
|
1284 exec 'hi vimMapRhsExtend' . s:fg_foreground
|
|
1285 exec 'hi vimCommentTitle' . s:fg_comment . s:ft_italic_bold
|
|
1286 exec 'hi vimBracket' . s:fg_aqua
|
|
1287 exec 'hi vimParenSep' . s:fg_aqua
|
|
1288 exec 'hi vimNotation' . s:fg_aqua
|
|
1289 exec 'hi vimOper' . s:fg_foreground
|
|
1290 exec 'hi vimOperParen' . s:fg_foreground
|
|
1291 exec 'hi vimSynType' . s:fg_purple
|
|
1292 exec 'hi vimSynReg' . s:fg_pink . s:ft_none
|
|
1293 exec 'hi vimSynRegion' . s:fg_foreground
|
|
1294 exec 'hi vimSynMtchGrp' . s:fg_pink
|
|
1295 exec 'hi vimSynNextgroup' . s:fg_pink
|
|
1296 exec 'hi vimSynKeyRegion' . s:fg_green
|
|
1297 exec 'hi vimSynRegOpt' . s:fg_blue
|
|
1298 exec 'hi vimSynMtchOpt' . s:fg_blue
|
|
1299 exec 'hi vimSynContains' . s:fg_pink
|
|
1300 exec 'hi vimGroupName' . s:fg_foreground
|
|
1301 exec 'hi vimGroupList' . s:fg_foreground
|
|
1302 exec 'hi vimHiGroup' . s:fg_foreground
|
|
1303 exec 'hi vimGroup' . s:fg_navy . s:ft_bold
|
|
1304 exec 'hi vimOnlyOption' . s:fg_blue
|
|
1305
|
|
1306 " Makefile Highlighting
|
|
1307 exec 'hi makeIdent' . s:fg_blue
|
|
1308 exec 'hi makeSpecTarget' . s:fg_olive
|
|
1309 exec 'hi makeTarget' . s:fg_red
|
|
1310 exec 'hi makeStatement' . s:fg_aqua . s:ft_bold
|
|
1311 exec 'hi makeCommands' . s:fg_foreground
|
|
1312 exec 'hi makeSpecial' . s:fg_orange . s:ft_bold
|
|
1313
|
|
1314 " CMake Highlighting (Builtin)
|
|
1315 exec 'hi cmakeStatement' . s:fg_blue
|
|
1316 exec 'hi cmakeArguments' . s:fg_foreground
|
|
1317 exec 'hi cmakeVariableValue' . s:fg_pink
|
|
1318
|
|
1319 " CMake Highlighting (Plugin: https://github.com/pboettch/vim-cmake-syntax)
|
|
1320 exec 'hi cmakeCommand' . s:fg_blue
|
|
1321 exec 'hi cmakeCommandConditional' . s:fg_purple . s:ft_bold
|
|
1322 exec 'hi cmakeKWset' . s:fg_orange
|
|
1323 exec 'hi cmakeKWvariable_watch' . s:fg_orange
|
|
1324 exec 'hi cmakeKWif' . s:fg_orange
|
|
1325 exec 'hi cmakeArguments' . s:fg_foreground
|
|
1326 exec 'hi cmakeKWproject' . s:fg_pink
|
|
1327 exec 'hi cmakeGeneratorExpressions' . s:fg_orange
|
|
1328 exec 'hi cmakeGeneratorExpression' . s:fg_aqua
|
|
1329 exec 'hi cmakeVariable' . s:fg_pink
|
|
1330 exec 'hi cmakeProperty' . s:fg_aqua
|
|
1331 exec 'hi cmakeKWforeach' . s:fg_aqua
|
|
1332 exec 'hi cmakeKWunset' . s:fg_aqua
|
|
1333 exec 'hi cmakeKWmacro' . s:fg_aqua
|
|
1334 exec 'hi cmakeKWget_property' . s:fg_aqua
|
|
1335 exec 'hi cmakeKWset_tests_properties' . s:fg_aqua
|
|
1336 exec 'hi cmakeKWmessage' . s:fg_aqua
|
|
1337 exec 'hi cmakeKWinstall_targets' . s:fg_orange
|
|
1338 exec 'hi cmakeKWsource_group' . s:fg_orange
|
|
1339 exec 'hi cmakeKWfind_package' . s:fg_aqua
|
|
1340 exec 'hi cmakeKWstring' . s:fg_olive
|
|
1341 exec 'hi cmakeKWinstall' . s:fg_aqua
|
|
1342 exec 'hi cmakeKWtarget_sources' . s:fg_orange
|
|
1343
|
|
1344 " C Highlighting
|
|
1345 exec 'hi cType' . s:fg_pink . s:ft_bold
|
|
1346 exec 'hi cFormat' . s:fg_olive
|
|
1347 exec 'hi cStorageClass' . s:fg_navy . s:ft_bold
|
|
1348
|
|
1349 exec 'hi cBoolean' . s:fg_green . s:ft_bold
|
|
1350 exec 'hi cCharacter' . s:fg_olive
|
|
1351 exec 'hi cConstant' . s:fg_green . s:ft_bold
|
|
1352 exec 'hi cConditional' . s:fg_purple . s:ft_bold
|
|
1353 exec 'hi cSpecial' . s:fg_olive . s:ft_bold
|
|
1354 exec 'hi cDefine' . s:fg_blue
|
|
1355 exec 'hi cNumber' . s:fg_orange
|
|
1356 exec 'hi cPreCondit' . s:fg_aqua
|
|
1357 exec 'hi cRepeat' . s:fg_purple . s:ft_bold
|
|
1358 exec 'hi cLabel' . s:fg_aqua
|
|
1359 " exec 'hi cAnsiFunction' . s:fg_aqua . s:ft_bold
|
|
1360 " exec 'hi cAnsiName' . s:fg_pink
|
|
1361 exec 'hi cDelimiter' . s:fg_blue
|
|
1362 " exec 'hi cBraces' . s:fg_foreground
|
|
1363 " exec 'hi cIdentifier' . s:fg_blue . s:bg_pink
|
|
1364 " exec 'hi cSemiColon' . s:bg_blue
|
|
1365 exec 'hi cOperator' . s:fg_aqua
|
|
1366 " exec 'hi cStatement' . s:fg_pink
|
|
1367 " exec 'hi cTodo' . s:fg_comment . s:ft_bold
|
|
1368 " exec 'hi cStructure' . s:fg_blue . s:ft_bold
|
|
1369 exec 'hi cCustomParen' . s:fg_foreground
|
|
1370 " exec 'hi cCustomFunc' . s:fg_foreground
|
|
1371 " exec 'hi cUserFunction' . s:fg_blue . s:ft_bold
|
|
1372 exec 'hi cOctalZero' . s:fg_purple . s:ft_bold
|
|
1373 if s:langOpt_c__highlight_builtins == 1
|
|
1374 exec 'hi cFunction' . s:fg_blue
|
|
1375 else
|
|
1376 exec 'hi cFunction' . s:fg_foreground
|
|
1377 endif
|
|
1378
|
|
1379 " CPP highlighting
|
|
1380 exec 'hi cppBoolean' . s:fg_green . s:ft_bold
|
|
1381 exec 'hi cppSTLnamespace' . s:fg_purple
|
|
1382 exec 'hi cppSTLexception' . s:fg_pink
|
|
1383 exec 'hi cppSTLfunctional' . s:fg_foreground . s:ft_bold
|
|
1384 exec 'hi cppSTLiterator' . s:fg_foreground . s:ft_bold
|
|
1385 exec 'hi cppExceptions' . s:fg_red
|
|
1386 exec 'hi cppStatement' . s:fg_blue
|
|
1387 exec 'hi cppStorageClass' . s:fg_navy . s:ft_bold
|
|
1388 exec 'hi cppAccess' . s:fg_orange . s:ft_bold
|
|
1389 if s:langOpt_cpp__highlight_standard_library == 1
|
|
1390 exec 'hi cppSTLconstant' . s:fg_green . s:ft_bold
|
|
1391 exec 'hi cppSTLtype' . s:fg_pink . s:ft_bold
|
|
1392 exec 'hi cppSTLfunction' . s:fg_blue
|
|
1393 exec 'hi cppSTLios' . s:fg_olive . s:ft_bold
|
|
1394 else
|
|
1395 exec 'hi cppSTLconstant' . s:fg_foreground
|
|
1396 exec 'hi cppSTLtype' . s:fg_foreground
|
|
1397 exec 'hi cppSTLfunction' . s:fg_foreground
|
|
1398 exec 'hi cppSTLios' . s:fg_foreground
|
|
1399 endif
|
|
1400 " exec 'hi cppSTL' . s:fg_blue
|
|
1401
|
|
1402 " Rust highlighting
|
|
1403 exec 'hi rustKeyword' . s:fg_pink
|
|
1404 exec 'hi rustModPath' . s:fg_blue
|
|
1405 exec 'hi rustModPathSep' . s:fg_blue
|
|
1406 exec 'hi rustLifetime' . s:fg_purple
|
|
1407 exec 'hi rustStructure' . s:fg_aqua . s:ft_bold
|
|
1408 exec 'hi rustAttribute' . s:fg_aqua . s:ft_bold
|
|
1409 exec 'hi rustPanic' . s:fg_olive . s:ft_bold
|
|
1410 exec 'hi rustTrait' . s:fg_blue . s:ft_bold
|
|
1411 exec 'hi rustEnum' . s:fg_green . s:ft_bold
|
|
1412 exec 'hi rustEnumVariant' . s:fg_green
|
|
1413 exec 'hi rustSelf' . s:fg_orange
|
|
1414 exec 'hi rustSigil' . s:fg_aqua . s:ft_bold
|
|
1415 exec 'hi rustOperator' . s:fg_aqua . s:ft_bold
|
|
1416 exec 'hi rustMacro' . s:fg_olive . s:ft_bold
|
|
1417 exec 'hi rustMacroVariable' . s:fg_olive
|
|
1418 exec 'hi rustAssert' . s:fg_olive . s:ft_bold
|
|
1419 exec 'hi rustConditional' . s:fg_purple . s:ft_bold
|
|
1420
|
|
1421 " Lex highlighting
|
|
1422 exec 'hi lexCFunctions' . s:fg_foreground
|
|
1423 exec 'hi lexAbbrv' . s:fg_purple
|
|
1424 exec 'hi lexAbbrvRegExp' . s:fg_aqua
|
|
1425 exec 'hi lexAbbrvComment' . s:fg_comment
|
|
1426 exec 'hi lexBrace' . s:fg_navy
|
|
1427 exec 'hi lexPat' . s:fg_aqua
|
|
1428 exec 'hi lexPatComment' . s:fg_comment
|
|
1429 exec 'hi lexPatTag' . s:fg_orange
|
|
1430 " exec 'hi lexPatBlock' . s:fg_foreground . s:ft_bold
|
|
1431 exec 'hi lexSlashQuote' . s:fg_foreground
|
|
1432 exec 'hi lexSep' . s:fg_foreground
|
|
1433 exec 'hi lexStartState' . s:fg_orange
|
|
1434 exec 'hi lexPatTagZone' . s:fg_olive . s:ft_bold
|
|
1435 exec 'hi lexMorePat' . s:fg_olive . s:ft_bold
|
|
1436 exec 'hi lexOptions' . s:fg_olive . s:ft_bold
|
|
1437 exec 'hi lexPatString' . s:fg_olive
|
|
1438
|
|
1439 " Yacc highlighting
|
|
1440 exec 'hi yaccNonterminal' . s:fg_navy
|
|
1441 exec 'hi yaccDelim' . s:fg_orange
|
|
1442 exec 'hi yaccInitKey' . s:fg_aqua
|
|
1443 exec 'hi yaccInit' . s:fg_navy
|
|
1444 exec 'hi yaccKey' . s:fg_purple
|
|
1445 exec 'hi yaccVar' . s:fg_aqua
|
|
1446
|
|
1447 " NASM highlighting
|
|
1448 exec 'hi nasmStdInstruction' . s:fg_navy
|
|
1449 exec 'hi nasmGen08Register' . s:fg_aqua
|
|
1450 exec 'hi nasmGen16Register' . s:fg_aqua
|
|
1451 exec 'hi nasmGen32Register' . s:fg_aqua
|
|
1452 exec 'hi nasmGen64Register' . s:fg_aqua
|
|
1453 exec 'hi nasmHexNumber' . s:fg_purple
|
|
1454 exec 'hi nasmStorage' . s:fg_aqua . s:ft_bold
|
|
1455 exec 'hi nasmLabel' . s:fg_pink
|
|
1456 exec 'hi nasmDirective' . s:fg_blue . s:ft_bold
|
|
1457 exec 'hi nasmLocalLabel' . s:fg_orange
|
|
1458
|
|
1459 " GAS highlighting
|
|
1460 exec 'hi gasSymbol' . s:fg_pink
|
|
1461 exec 'hi gasDirective' . s:fg_blue . s:ft_bold
|
|
1462 exec 'hi gasOpcode_386_Base' . s:fg_navy
|
|
1463 exec 'hi gasDecimalNumber' . s:fg_purple
|
|
1464 exec 'hi gasSymbolRef' . s:fg_pink
|
|
1465 exec 'hi gasRegisterX86' . s:fg_blue
|
|
1466 exec 'hi gasOpcode_P6_Base' . s:fg_navy
|
|
1467 exec 'hi gasDirectiveStore' . s:fg_foreground . s:ft_bold
|
|
1468
|
|
1469 " MIPS highlighting
|
|
1470 exec 'hi mipsInstruction' . s:fg_pink
|
|
1471 exec 'hi mipsRegister' . s:fg_navy
|
|
1472 exec 'hi mipsLabel' . s:fg_aqua . s:ft_bold
|
|
1473 exec 'hi mipsDirective' . s:fg_purple . s:ft_bold
|
|
1474
|
|
1475 " Shell/Bash highlighting
|
|
1476 exec 'hi bashStatement' . s:fg_foreground . s:ft_bold
|
|
1477 exec 'hi shDerefVar' . s:fg_aqua . s:ft_bold
|
|
1478 exec 'hi shDerefSimple' . s:fg_aqua
|
|
1479 exec 'hi shFunction' . s:fg_orange . s:ft_bold
|
|
1480 exec 'hi shStatement' . s:fg_foreground
|
|
1481 exec 'hi shLoop' . s:fg_purple . s:ft_bold
|
|
1482 exec 'hi shQuote' . s:fg_olive
|
|
1483 exec 'hi shCaseEsac' . s:fg_aqua . s:ft_bold
|
|
1484 exec 'hi shSnglCase' . s:fg_purple . s:ft_none
|
|
1485 exec 'hi shFunctionOne' . s:fg_navy
|
|
1486 exec 'hi shCase' . s:fg_navy
|
|
1487 exec 'hi shSetList' . s:fg_navy
|
|
1488 " @see Dockerfile Highlighting section for more sh*
|
|
1489
|
|
1490 " PowerShell Highlighting
|
|
1491 exec 'hi ps1Type' . s:fg_green . s:ft_bold
|
|
1492 exec 'hi ps1Variable' . s:fg_navy
|
|
1493 exec 'hi ps1Boolean' . s:fg_navy . s:ft_bold
|
|
1494 exec 'hi ps1FunctionInvocation' . s:fg_pink
|
|
1495 exec 'hi ps1FunctionDeclaration' . s:fg_pink
|
|
1496 exec 'hi ps1Keyword' . s:fg_blue . s:ft_bold
|
|
1497 exec 'hi ps1Exception' . s:fg_red
|
|
1498 exec 'hi ps1Operator' . s:fg_aqua . s:ft_bold
|
|
1499 exec 'hi ps1CommentDoc' . s:fg_purple
|
|
1500 exec 'hi ps1CDocParam' . s:fg_orange
|
|
1501
|
|
1502 " HTML Highlighting
|
|
1503 exec 'hi htmlTitle' . s:fg_green . s:ft_bold
|
|
1504 exec 'hi htmlH1' . s:fg_green . s:ft_bold
|
|
1505 exec 'hi htmlH2' . s:fg_aqua . s:ft_bold
|
|
1506 exec 'hi htmlH3' . s:fg_purple . s:ft_bold
|
|
1507 exec 'hi htmlH4' . s:fg_orange . s:ft_bold
|
|
1508 exec 'hi htmlTag' . s:fg_comment
|
|
1509 exec 'hi htmlTagName' . s:fg_wine
|
|
1510 exec 'hi htmlArg' . s:fg_pink
|
|
1511 exec 'hi htmlEndTag' . s:fg_comment
|
|
1512 exec 'hi htmlString' . s:fg_blue
|
|
1513 exec 'hi htmlScriptTag' . s:fg_comment
|
|
1514 exec 'hi htmlBold' . s:fg_foreground . s:ft_bold
|
|
1515 exec 'hi htmlItalic' . s:fg_comment . s:ft_italic
|
|
1516 exec 'hi htmlBoldItalic' . s:fg_navy . s:ft_italic_bold
|
|
1517 " exec 'hi htmlLink' . s:fg_blue . s:ft_bold
|
|
1518 exec 'hi htmlTagN' . s:fg_wine . s:ft_bold
|
|
1519 exec 'hi htmlSpecialTagName' . s:fg_wine
|
|
1520 exec 'hi htmlComment' . s:fg_comment . s:ft_italic
|
|
1521 exec 'hi htmlCommentPart' . s:fg_comment . s:ft_italic
|
|
1522
|
|
1523 " CSS Highlighting
|
|
1524 exec 'hi cssIdentifier' . s:fg_pink
|
|
1525 exec 'hi cssPositioningProp' . s:fg_foreground
|
|
1526 exec 'hi cssNoise' . s:fg_foreground
|
|
1527 exec 'hi cssBoxProp' . s:fg_foreground
|
|
1528 exec 'hi cssTableAttr' . s:fg_purple
|
|
1529 exec 'hi cssPositioningAttr' . s:fg_navy
|
|
1530 exec 'hi cssValueLength' . s:fg_orange
|
|
1531 exec 'hi cssFunctionName' . s:fg_blue
|
|
1532 exec 'hi cssUnitDecorators' . s:fg_aqua
|
|
1533 exec 'hi cssColor' . s:fg_blue . s:ft_bold
|
|
1534 exec 'hi cssBraces' . s:fg_pink
|
|
1535 exec 'hi cssBackgroundProp' . s:fg_foreground
|
|
1536 exec 'hi cssTextProp' . s:fg_foreground
|
|
1537 exec 'hi cssDimensionProp' . s:fg_foreground
|
|
1538 exec 'hi cssClassName' . s:fg_pink
|
|
1539
|
|
1540 " Markdown Highlighting
|
|
1541 exec 'hi markdownHeadingRule' . s:fg_pink . s:ft_bold
|
|
1542 exec 'hi markdownH1' . s:fg_pink . s:ft_bold
|
|
1543 exec 'hi markdownH2' . s:fg_orange . s:ft_bold
|
|
1544 exec 'hi markdownBlockquote' . s:fg_pink
|
|
1545 exec 'hi markdownCodeBlock' . s:fg_olive
|
|
1546 exec 'hi markdownCode' . s:fg_olive
|
|
1547 exec 'hi markdownLink' . s:fg_blue . s:ft_bold
|
|
1548 exec 'hi markdownUrl' . s:fg_blue
|
|
1549 exec 'hi markdownLinkText' . s:fg_pink
|
|
1550 exec 'hi markdownLinkTextDelimiter' . s:fg_purple
|
|
1551 exec 'hi markdownLinkDelimiter' . s:fg_purple
|
|
1552 exec 'hi markdownCodeDelimiter' . s:fg_blue
|
|
1553
|
|
1554 exec 'hi mkdCode' . s:fg_olive
|
|
1555 exec 'hi mkdLink' . s:fg_blue . s:ft_bold
|
|
1556 exec 'hi mkdURL' . s:fg_comment
|
|
1557 exec 'hi mkdString' . s:fg_foreground
|
|
1558 exec 'hi mkdBlockQuote' . s:fg_pink
|
|
1559 exec 'hi mkdLinkTitle' . s:fg_pink
|
|
1560 exec 'hi mkdDelimiter' . s:fg_aqua
|
|
1561 exec 'hi mkdRule' . s:fg_pink
|
|
1562
|
|
1563 " reStructuredText Highlighting
|
|
1564 exec 'hi rstSections' . s:fg_pink . s:ft_bold
|
|
1565 exec 'hi rstDelimiter' . s:fg_pink . s:ft_bold
|
|
1566 exec 'hi rstExplicitMarkup' . s:fg_pink . s:ft_bold
|
|
1567 exec 'hi rstDirective' . s:fg_blue
|
|
1568 exec 'hi rstHyperlinkTarget' . s:fg_green
|
|
1569 exec 'hi rstExDirective' . s:fg_foreground
|
|
1570 exec 'hi rstInlineLiteral' . s:fg_olive
|
|
1571 exec 'hi rstInterpretedTextOrHyperlinkReference' . s:fg_blue
|
|
1572
|
|
1573 " Python Highlighting
|
|
1574 exec 'hi pythonImport' . s:fg_pink . s:ft_bold
|
|
1575 exec 'hi pythonExceptions' . s:fg_red
|
|
1576 exec 'hi pythonException' . s:fg_purple . s:ft_bold
|
|
1577 exec 'hi pythonInclude' . s:fg_red
|
|
1578 exec 'hi pythonStatement' . s:fg_pink
|
|
1579 exec 'hi pythonConditional' . s:fg_purple . s:ft_bold
|
|
1580 exec 'hi pythonRepeat' . s:fg_purple . s:ft_bold
|
|
1581 exec 'hi pythonFunction' . s:fg_aqua . s:ft_bold
|
|
1582 exec 'hi pythonPreCondit' . s:fg_purple
|
|
1583 exec 'hi pythonExClass' . s:fg_orange
|
|
1584 exec 'hi pythonOperator' . s:fg_purple . s:ft_bold
|
|
1585 exec 'hi pythonBuiltin' . s:fg_foreground
|
|
1586 exec 'hi pythonDecorator' . s:fg_orange
|
|
1587
|
|
1588 exec 'hi pythonString' . s:fg_olive
|
|
1589 exec 'hi pythonEscape' . s:fg_olive . s:ft_bold
|
|
1590 exec 'hi pythonStrFormatting' . s:fg_olive . s:ft_bold
|
|
1591
|
|
1592 exec 'hi pythonBoolean' . s:fg_green . s:ft_bold
|
|
1593 exec 'hi pythonBytesEscape' . s:fg_olive . s:ft_bold
|
|
1594 exec 'hi pythonDottedName' . s:fg_purple
|
|
1595 exec 'hi pythonStrFormat' . s:fg_foreground
|
|
1596
|
|
1597 if s:langOpt_python__highlight_builtins == 1
|
|
1598 exec 'hi pythonBuiltinFunc' . s:fg_blue
|
|
1599 exec 'hi pythonBuiltinObj' . s:fg_red
|
|
1600 else
|
|
1601 exec 'hi pythonBuiltinFunc' . s:fg_foreground
|
|
1602 exec 'hi pythonBuiltinObj' . s:fg_foreground
|
|
1603 endif
|
|
1604
|
|
1605 " Java Highlighting
|
|
1606 exec 'hi javaExternal' . s:fg_pink
|
|
1607 exec 'hi javaAnnotation' . s:fg_orange
|
|
1608 exec 'hi javaTypedef' . s:fg_aqua
|
|
1609 exec 'hi javaClassDecl' . s:fg_aqua . s:ft_bold
|
|
1610 exec 'hi javaScopeDecl' . s:fg_blue . s:ft_bold
|
|
1611 exec 'hi javaStorageClass' . s:fg_navy . s:ft_bold
|
|
1612 exec 'hi javaBoolean' . s:fg_green . s:ft_bold
|
|
1613 exec 'hi javaConstant' . s:fg_blue
|
|
1614 exec 'hi javaCommentTitle' . s:fg_wine
|
|
1615 exec 'hi javaDocTags' . s:fg_aqua
|
|
1616 exec 'hi javaDocComment' . s:fg_comment
|
|
1617 exec 'hi javaDocParam' . s:fg_foreground
|
|
1618 exec 'hi javaStatement' . s:fg_pink
|
|
1619
|
|
1620 " JavaScript Highlighting
|
|
1621 exec 'hi javaScriptBraces' . s:fg_blue
|
|
1622 exec 'hi javaScriptParens' . s:fg_blue
|
|
1623 exec 'hi javaScriptIdentifier' . s:fg_pink
|
|
1624 exec 'hi javaScriptFunction' . s:fg_blue . s:ft_bold
|
|
1625 exec 'hi javaScriptConditional' . s:fg_purple . s:ft_bold
|
|
1626 exec 'hi javaScriptRepeat' . s:fg_purple . s:ft_bold
|
|
1627 exec 'hi javaScriptBoolean' . s:fg_green . s:ft_bold
|
|
1628 exec 'hi javaScriptNumber' . s:fg_orange
|
|
1629 exec 'hi javaScriptMember' . s:fg_navy
|
|
1630 exec 'hi javaScriptReserved' . s:fg_navy
|
|
1631 exec 'hi javascriptNull' . s:fg_comment . s:ft_bold
|
|
1632 exec 'hi javascriptGlobal' . s:fg_foreground
|
|
1633 exec 'hi javascriptStatement' . s:fg_pink
|
|
1634 exec 'hi javaScriptMessage' . s:fg_foreground
|
|
1635 exec 'hi javaScriptMember' . s:fg_foreground
|
|
1636
|
|
1637 " TypeScript Highlighting
|
|
1638 exec 'hi typescriptDecorators' . s:fg_orange
|
|
1639 exec 'hi typescriptLabel' . s:fg_purple . s:ft_bold
|
|
1640
|
|
1641 " @target https://github.com/pangloss/vim-javascript
|
|
1642 exec 'hi jsImport' . s:fg_pink . s:ft_bold
|
|
1643 exec 'hi jsExport' . s:fg_pink . s:ft_bold
|
|
1644 exec 'hi jsModuleAs' . s:fg_pink . s:ft_bold
|
|
1645 exec 'hi jsFrom' . s:fg_pink . s:ft_bold
|
|
1646 exec 'hi jsExportDefault' . s:fg_pink . s:ft_bold
|
|
1647 exec 'hi jsFuncParens' . s:fg_blue
|
|
1648 exec 'hi jsFuncBraces' . s:fg_blue
|
|
1649 exec 'hi jsParens' . s:fg_blue
|
|
1650 exec 'hi jsBraces' . s:fg_blue
|
|
1651 exec 'hi jsNoise' . s:fg_blue
|
|
1652
|
|
1653 " Jsx Highlighting
|
|
1654 " @target https://github.com/MaxMEllon/vim-jsx-pretty
|
|
1655 exec 'hi jsxTagName' . s:fg_wine
|
|
1656 exec 'hi jsxComponentName' . s:fg_wine
|
|
1657 exec 'hi jsxAttrib' . s:fg_pink
|
|
1658 exec 'hi jsxEqual' . s:fg_comment
|
|
1659 exec 'hi jsxString' . s:fg_blue
|
|
1660 exec 'hi jsxCloseTag' . s:fg_comment
|
|
1661 exec 'hi jsxCloseString' . s:fg_comment
|
|
1662 exec 'hi jsxDot' . s:fg_wine
|
|
1663 exec 'hi jsxNamespace' . s:fg_wine
|
|
1664 exec 'hi jsxPunct' . s:fg_comment
|
|
1665
|
|
1666 " Json Highlighting
|
|
1667 " @target https://github.com/elzr/vim-json
|
|
1668 exec 'hi jsonKeyword' . s:fg_blue
|
|
1669 exec 'hi jsonString' . s:fg_olive
|
|
1670 exec 'hi jsonQuote' . s:fg_comment
|
|
1671 exec 'hi jsonNoise' . s:fg_foreground
|
|
1672 exec 'hi jsonKeywordMatch' . s:fg_foreground
|
|
1673 exec 'hi jsonBraces' . s:fg_foreground
|
|
1674 exec 'hi jsonNumber' . s:fg_orange
|
|
1675 exec 'hi jsonNull' . s:fg_purple . s:ft_bold
|
|
1676 exec 'hi jsonBoolean' . s:fg_green . s:ft_bold
|
|
1677 exec 'hi jsonCommentError' . s:fg_pink . s:bg_background
|
|
1678
|
|
1679 " Go Highlighting
|
|
1680 exec 'hi goDirective' . s:fg_red
|
|
1681 exec 'hi goDeclaration' . s:fg_blue . s:ft_bold
|
|
1682 exec 'hi goStatement' . s:fg_pink
|
|
1683 exec 'hi goConditional' . s:fg_purple . s:ft_bold
|
|
1684 exec 'hi goConstants' . s:fg_orange
|
|
1685 exec 'hi goFunction' . s:fg_orange
|
|
1686 " exec 'hi goTodo' . s:fg_comment . s:ft_bold
|
|
1687 exec 'hi goDeclType' . s:fg_blue
|
|
1688 exec 'hi goBuiltins' . s:fg_purple
|
|
1689
|
|
1690 " Systemtap Highlighting
|
|
1691 " exec 'hi stapBlock' . s:fg_comment . s:ft_none
|
|
1692 exec 'hi stapComment' . s:fg_comment . s:ft_none
|
|
1693 exec 'hi stapProbe' . s:fg_aqua . s:ft_bold
|
|
1694 exec 'hi stapStat' . s:fg_navy . s:ft_bold
|
|
1695 exec 'hi stapFunc' . s:fg_foreground
|
|
1696 exec 'hi stapString' . s:fg_olive
|
|
1697 exec 'hi stapTarget' . s:fg_navy
|
|
1698 exec 'hi stapStatement' . s:fg_pink
|
|
1699 exec 'hi stapType' . s:fg_pink . s:ft_bold
|
|
1700 exec 'hi stapSharpBang' . s:fg_comment
|
|
1701 exec 'hi stapDeclaration' . s:fg_pink
|
|
1702 exec 'hi stapCMacro' . s:fg_blue
|
|
1703
|
|
1704 " DTrace Highlighting
|
|
1705 exec 'hi dtraceProbe' . s:fg_blue
|
|
1706 exec 'hi dtracePredicate' . s:fg_purple . s:ft_bold
|
|
1707 exec 'hi dtraceComment' . s:fg_comment
|
|
1708 exec 'hi dtraceFunction' . s:fg_foreground
|
|
1709 exec 'hi dtraceAggregatingFunction' . s:fg_blue . s:ft_bold
|
|
1710 exec 'hi dtraceStatement' . s:fg_navy . s:ft_bold
|
|
1711 exec 'hi dtraceIdentifier' . s:fg_pink
|
|
1712 exec 'hi dtraceOption' . s:fg_pink
|
|
1713 exec 'hi dtraceConstant' . s:fg_orange
|
|
1714 exec 'hi dtraceType' . s:fg_pink . s:ft_bold
|
|
1715
|
|
1716 " PlantUML Highlighting
|
|
1717 exec 'hi plantumlPreProc' . s:fg_orange . s:ft_bold
|
|
1718 exec 'hi plantumlDirectedOrVerticalArrowRL' . s:fg_pink
|
|
1719 exec 'hi plantumlDirectedOrVerticalArrowLR' . s:fg_pink
|
|
1720 exec 'hi plantumlString' . s:fg_olive
|
|
1721 exec 'hi plantumlActivityThing' . s:fg_purple
|
|
1722 exec 'hi plantumlText' . s:fg_navy
|
|
1723 exec 'hi plantumlClassPublic' . s:fg_olive . s:ft_bold
|
|
1724 exec 'hi plantumlClassPrivate' . s:fg_red
|
|
1725 exec 'hi plantumlColonLine' . s:fg_orange
|
|
1726 exec 'hi plantumlClass' . s:fg_navy
|
|
1727 exec 'hi plantumlHorizontalArrow' . s:fg_pink
|
|
1728 exec 'hi plantumlTypeKeyword' . s:fg_blue . s:ft_bold
|
|
1729 exec 'hi plantumlKeyword' . s:fg_pink . s:ft_bold
|
|
1730
|
|
1731 exec 'hi plantumlType' . s:fg_blue . s:ft_bold
|
|
1732 exec 'hi plantumlBlock' . s:fg_pink . s:ft_bold
|
|
1733 exec 'hi plantumlPreposition' . s:fg_orange
|
|
1734 exec 'hi plantumlLayout' . s:fg_blue . s:ft_bold
|
|
1735 exec 'hi plantumlNote' . s:fg_orange
|
|
1736 exec 'hi plantumlLifecycle' . s:fg_aqua
|
|
1737 exec 'hi plantumlParticipant' . s:fg_foreground . s:ft_bold
|
|
1738
|
|
1739
|
|
1740 " Haskell Highlighting
|
|
1741 exec 'hi haskellType' . s:fg_aqua . s:ft_bold
|
|
1742 exec 'hi haskellIdentifier' . s:fg_orange . s:ft_bold
|
|
1743 exec 'hi haskellOperators' . s:fg_pink
|
|
1744 exec 'hi haskellWhere' . s:fg_foreground . s:ft_bold
|
|
1745 exec 'hi haskellDelimiter' . s:fg_aqua
|
|
1746 exec 'hi haskellImportKeywords' . s:fg_pink
|
|
1747 exec 'hi haskellStatement' . s:fg_purple . s:ft_bold
|
|
1748
|
|
1749
|
|
1750 " SQL/MySQL Highlighting
|
|
1751 exec 'hi sqlStatement' . s:fg_pink . s:ft_bold
|
|
1752 exec 'hi sqlType' . s:fg_blue . s:ft_bold
|
|
1753 exec 'hi sqlKeyword' . s:fg_pink
|
|
1754 exec 'hi sqlOperator' . s:fg_aqua
|
|
1755 exec 'hi sqlSpecial' . s:fg_green . s:ft_bold
|
|
1756
|
|
1757 exec 'hi mysqlVariable' . s:fg_olive . s:ft_bold
|
|
1758 exec 'hi mysqlType' . s:fg_blue . s:ft_bold
|
|
1759 exec 'hi mysqlKeyword' . s:fg_pink
|
|
1760 exec 'hi mysqlOperator' . s:fg_aqua
|
|
1761 exec 'hi mysqlSpecial' . s:fg_green . s:ft_bold
|
|
1762
|
|
1763
|
|
1764 " Octave/MATLAB Highlighting
|
|
1765 exec 'hi octaveVariable' . s:fg_foreground
|
|
1766 exec 'hi octaveDelimiter' . s:fg_pink
|
|
1767 exec 'hi octaveQueryVar' . s:fg_foreground
|
|
1768 exec 'hi octaveSemicolon' . s:fg_purple
|
|
1769 exec 'hi octaveFunction' . s:fg_navy
|
|
1770 exec 'hi octaveSetVar' . s:fg_blue
|
|
1771 exec 'hi octaveUserVar' . s:fg_foreground
|
|
1772 exec 'hi octaveArithmeticOperator' . s:fg_aqua
|
|
1773 exec 'hi octaveBeginKeyword' . s:fg_purple . s:ft_bold
|
|
1774 exec 'hi octaveElseKeyword' . s:fg_purple . s:ft_bold
|
|
1775 exec 'hi octaveEndKeyword' . s:fg_purple . s:ft_bold
|
|
1776 exec 'hi octaveStatement' . s:fg_pink
|
|
1777
|
|
1778 " Ruby Highlighting
|
|
1779 exec 'hi rubyModule' . s:fg_navy . s:ft_bold
|
|
1780 exec 'hi rubyClass' . s:fg_pink . s:ft_bold
|
|
1781 exec 'hi rubyPseudoVariable' . s:fg_comment . s:ft_bold
|
|
1782 exec 'hi rubyKeyword' . s:fg_pink
|
|
1783 exec 'hi rubyInstanceVariable' . s:fg_purple
|
|
1784 exec 'hi rubyFunction' . s:fg_foreground . s:ft_bold
|
|
1785 exec 'hi rubyDefine' . s:fg_pink
|
|
1786 exec 'hi rubySymbol' . s:fg_aqua
|
|
1787 exec 'hi rubyConstant' . s:fg_blue
|
|
1788 exec 'hi rubyAccess' . s:fg_navy
|
|
1789 exec 'hi rubyAttribute' . s:fg_green
|
|
1790 exec 'hi rubyInclude' . s:fg_red
|
|
1791 exec 'hi rubyLocalVariableOrMethod' . s:fg_orange
|
|
1792 exec 'hi rubyCurlyBlock' . s:fg_foreground
|
|
1793 exec 'hi rubyCurlyBlockDelimiter' . s:fg_aqua
|
|
1794 exec 'hi rubyArrayDelimiter' . s:fg_aqua
|
|
1795 exec 'hi rubyStringDelimiter' . s:fg_olive
|
|
1796 exec 'hi rubyInterpolationDelimiter' . s:fg_orange
|
|
1797 exec 'hi rubyConditional' . s:fg_purple . s:ft_bold
|
|
1798 exec 'hi rubyRepeat' . s:fg_purple . s:ft_bold
|
|
1799 exec 'hi rubyControl' . s:fg_purple . s:ft_bold
|
|
1800 exec 'hi rubyException' . s:fg_purple . s:ft_bold
|
|
1801 exec 'hi rubyExceptional' . s:fg_purple . s:ft_bold
|
|
1802 exec 'hi rubyBoolean' . s:fg_green . s:ft_bold
|
|
1803
|
|
1804 " Fortran Highlighting
|
|
1805 exec 'hi fortranUnitHeader' . s:fg_blue . s:ft_bold
|
|
1806 exec 'hi fortranIntrinsic' . s:fg_blue . s:bg_background . s:ft_none
|
|
1807 exec 'hi fortranType' . s:fg_pink . s:ft_bold
|
|
1808 exec 'hi fortranTypeOb' . s:fg_pink . s:ft_bold
|
|
1809 exec 'hi fortranStructure' . s:fg_aqua
|
|
1810 exec 'hi fortranStorageClass' . s:fg_navy . s:ft_bold
|
|
1811 exec 'hi fortranStorageClassR' . s:fg_navy . s:ft_bold
|
|
1812 exec 'hi fortranKeyword' . s:fg_pink
|
|
1813 exec 'hi fortranReadWrite' . s:fg_aqua . s:ft_bold
|
|
1814 exec 'hi fortranIO' . s:fg_navy
|
|
1815 exec 'hi fortranOperator' . s:fg_aqua . s:ft_bold
|
|
1816 exec 'hi fortranCall' . s:fg_aqua . s:ft_bold
|
|
1817 exec 'hi fortranContinueMark' . s:fg_green
|
|
1818
|
|
1819 " ALGOL Highlighting (Plugin: https://github.com/sterpe/vim-algol68)
|
|
1820 exec 'hi algol68Statement' . s:fg_blue . s:ft_bold
|
|
1821 exec 'hi algol68Operator' . s:fg_aqua . s:ft_bold
|
|
1822 exec 'hi algol68PreProc' . s:fg_green
|
|
1823 exec 'hi algol68Function' . s:fg_blue
|
|
1824
|
|
1825 " R Highlighting
|
|
1826 exec 'hi rType' . s:fg_blue
|
|
1827 exec 'hi rArrow' . s:fg_pink
|
|
1828 exec 'hi rDollar' . s:fg_blue
|
|
1829
|
|
1830 " XXD Highlighting
|
|
1831 exec 'hi xxdAddress' . s:fg_navy
|
|
1832 exec 'hi xxdSep' . s:fg_pink
|
|
1833 exec 'hi xxdAscii' . s:fg_pink
|
|
1834 exec 'hi xxdDot' . s:fg_aqua
|
|
1835
|
|
1836 " PHP Highlighting
|
|
1837 exec 'hi phpIdentifier' . s:fg_foreground
|
|
1838 exec 'hi phpVarSelector' . s:fg_pink
|
|
1839 exec 'hi phpKeyword' . s:fg_blue
|
|
1840 exec 'hi phpRepeat' . s:fg_purple . s:ft_bold
|
|
1841 exec 'hi phpConditional' . s:fg_purple . s:ft_bold
|
|
1842 exec 'hi phpStatement' . s:fg_pink
|
|
1843 exec 'hi phpAssignByRef' . s:fg_aqua . s:ft_bold
|
|
1844 exec 'hi phpSpecialFunction' . s:fg_blue
|
|
1845 exec 'hi phpFunctions' . s:fg_blue
|
|
1846 exec 'hi phpComparison' . s:fg_aqua
|
|
1847 exec 'hi phpBackslashSequences' . s:fg_olive . s:ft_bold
|
|
1848 exec 'hi phpMemberSelector' . s:fg_blue
|
|
1849 exec 'hi phpStorageClass' . s:fg_purple . s:ft_bold
|
|
1850 exec 'hi phpDefine' . s:fg_navy
|
|
1851 exec 'hi phpIntVar' . s:fg_navy . s:ft_bold
|
|
1852
|
|
1853 " Perl Highlighting
|
|
1854 exec 'hi perlFiledescRead' . s:fg_green
|
|
1855 exec 'hi perlMatchStartEnd' . s:fg_pink
|
|
1856 exec 'hi perlStatementFlow' . s:fg_pink
|
|
1857 exec 'hi perlStatementStorage' . s:fg_pink
|
|
1858 exec 'hi perlFunction' . s:fg_pink . s:ft_bold
|
|
1859 exec 'hi perlMethod' . s:fg_foreground
|
|
1860 exec 'hi perlStatementFiledesc' . s:fg_orange
|
|
1861 exec 'hi perlVarPlain' . s:fg_navy
|
|
1862 exec 'hi perlSharpBang' . s:fg_comment
|
|
1863 exec 'hi perlStatementInclude' . s:fg_aqua . s:ft_bold
|
|
1864 exec 'hi perlStatementScalar' . s:fg_purple
|
|
1865 exec 'hi perlSubName' . s:fg_aqua . s:ft_bold
|
|
1866 exec 'hi perlSpecialString' . s:fg_olive . s:ft_bold
|
|
1867
|
|
1868 " Pascal Highlighting
|
|
1869 exec 'hi pascalType' . s:fg_pink . s:ft_bold
|
|
1870 exec 'hi pascalStatement' . s:fg_blue . s:ft_bold
|
|
1871 exec 'hi pascalPredefined' . s:fg_pink
|
|
1872 exec 'hi pascalFunction' . s:fg_foreground
|
|
1873 exec 'hi pascalStruct' . s:fg_navy . s:ft_bold
|
|
1874 exec 'hi pascalOperator' . s:fg_aqua . s:ft_bold
|
|
1875 exec 'hi pascalPreProc' . s:fg_green
|
|
1876 exec 'hi pascalAcces' . s:fg_navy . s:ft_bold
|
|
1877
|
|
1878 " Lua Highlighting
|
|
1879 exec 'hi luaFunc' . s:fg_foreground
|
|
1880 exec 'hi luaIn' . s:fg_blue . s:ft_bold
|
|
1881 exec 'hi luaFunction' . s:fg_pink
|
|
1882 exec 'hi luaStatement' . s:fg_blue
|
|
1883 exec 'hi luaRepeat' . s:fg_blue . s:ft_bold
|
|
1884 exec 'hi luaCondStart' . s:fg_purple . s:ft_bold
|
|
1885 exec 'hi luaTable' . s:fg_aqua . s:ft_bold
|
|
1886 exec 'hi luaConstant' . s:fg_green . s:ft_bold
|
|
1887 exec 'hi luaElse' . s:fg_purple . s:ft_bold
|
|
1888 exec 'hi luaCondElseif' . s:fg_purple . s:ft_bold
|
|
1889 exec 'hi luaCond' . s:fg_purple . s:ft_bold
|
|
1890 exec 'hi luaCondEnd' . s:fg_purple
|
|
1891
|
|
1892 " Clojure highlighting:
|
|
1893 exec 'hi clojureConstant' . s:fg_blue
|
|
1894 exec 'hi clojureBoolean' . s:fg_orange
|
|
1895 exec 'hi clojureCharacter' . s:fg_olive
|
|
1896 exec 'hi clojureKeyword' . s:fg_pink
|
|
1897 exec 'hi clojureNumber' . s:fg_orange
|
|
1898 exec 'hi clojureString' . s:fg_olive
|
|
1899 exec 'hi clojureRegexp' . s:fg_purple
|
|
1900 exec 'hi clojureRegexpEscape' . s:fg_pink
|
|
1901 exec 'hi clojureParen' . s:fg_aqua
|
|
1902 exec 'hi clojureVariable' . s:fg_olive
|
|
1903 exec 'hi clojureCond' . s:fg_blue
|
|
1904 exec 'hi clojureDefine' . s:fg_blue . s:ft_bold
|
|
1905 exec 'hi clojureException' . s:fg_red
|
|
1906 exec 'hi clojureFunc' . s:fg_navy
|
|
1907 exec 'hi clojureMacro' . s:fg_blue
|
|
1908 exec 'hi clojureRepeat' . s:fg_blue
|
|
1909 exec 'hi clojureSpecial' . s:fg_blue . s:ft_bold
|
|
1910 exec 'hi clojureQuote' . s:fg_blue
|
|
1911 exec 'hi clojureUnquote' . s:fg_blue
|
|
1912 exec 'hi clojureMeta' . s:fg_blue
|
|
1913 exec 'hi clojureDeref' . s:fg_blue
|
|
1914 exec 'hi clojureAnonArg' . s:fg_blue
|
|
1915 exec 'hi clojureRepeat' . s:fg_blue
|
|
1916 exec 'hi clojureDispatch' . s:fg_aqua
|
|
1917
|
|
1918 " Dockerfile Highlighting
|
|
1919 " @target https://github.com/docker/docker/tree/master/contrib/syntax/vim
|
|
1920 exec 'hi dockerfileKeyword' . s:fg_blue
|
|
1921 exec 'hi shDerefVar' . s:fg_purple . s:ft_bold
|
|
1922 exec 'hi shOperator' . s:fg_aqua
|
|
1923 exec 'hi shOption' . s:fg_navy
|
|
1924 exec 'hi shLine' . s:fg_foreground
|
|
1925 exec 'hi shWrapLineOperator' . s:fg_pink
|
|
1926
|
|
1927 " NGINX Highlighting
|
|
1928 " @target https://github.com/evanmiller/nginx-vim-syntax
|
|
1929 exec 'hi ngxDirectiveBlock' . s:fg_pink . s:ft_bold
|
|
1930 exec 'hi ngxDirective' . s:fg_blue . s:ft_none
|
|
1931 exec 'hi ngxDirectiveImportant' . s:fg_blue . s:ft_bold
|
|
1932 exec 'hi ngxString' . s:fg_olive
|
|
1933 exec 'hi ngxVariableString' . s:fg_purple
|
|
1934 exec 'hi ngxVariable' . s:fg_purple . s:ft_none
|
|
1935
|
|
1936 " Yaml Highlighting
|
|
1937 exec 'hi yamlBlockMappingKey' . s:fg_blue
|
|
1938 exec 'hi yamlKeyValueDelimiter' . s:fg_pink
|
|
1939 exec 'hi yamlBlockCollectionItemStart' . s:fg_pink
|
|
1940
|
|
1941 " Qt QML Highlighting
|
|
1942 exec 'hi qmlObjectLiteralType' . s:fg_pink
|
|
1943 exec 'hi qmlReserved' . s:fg_purple
|
|
1944 exec 'hi qmlBindingProperty' . s:fg_navy
|
|
1945 exec 'hi qmlType' . s:fg_navy
|
|
1946
|
|
1947 " Dosini Highlighting
|
|
1948 exec 'hi dosiniHeader' . s:fg_pink
|
|
1949 exec 'hi dosiniLabel' . s:fg_blue
|
|
1950
|
|
1951 " Mail highlighting
|
|
1952 exec 'hi mailHeaderKey' . s:fg_blue
|
|
1953 exec 'hi mailHeaderEmail' . s:fg_purple
|
|
1954 exec 'hi mailSubject' . s:fg_pink
|
|
1955 exec 'hi mailHeader' . s:fg_comment
|
|
1956 exec 'hi mailURL' . s:fg_aqua
|
|
1957 exec 'hi mailEmail' . s:fg_purple
|
|
1958 exec 'hi mailQuoted1' . s:fg_olive
|
|
1959 exec 'hi mailQuoted2' . s:fg_navy
|
|
1960
|
|
1961 " XML Highlighting
|
|
1962 exec 'hi xmlProcessingDelim' . s:fg_pink
|
|
1963 exec 'hi xmlString' . s:fg_olive
|
|
1964 exec 'hi xmlEqual' . s:fg_orange
|
|
1965 exec 'hi xmlAttrib' . s:fg_navy
|
|
1966 exec 'hi xmlAttribPunct' . s:fg_pink
|
|
1967 exec 'hi xmlTag' . s:fg_blue
|
|
1968 exec 'hi xmlTagName' . s:fg_blue
|
|
1969 exec 'hi xmlEndTag' . s:fg_blue
|
|
1970 exec 'hi xmlNamespace' . s:fg_orange
|
|
1971
|
|
1972 " Exlixir Highlighting
|
|
1973 " @target https://github.com/elixir-lang/vim-elixir
|
|
1974 exec 'hi elixirAlias' . s:fg_blue . s:ft_bold
|
|
1975 exec 'hi elixirAtom' . s:fg_navy
|
|
1976 exec 'hi elixirVariable' . s:fg_navy
|
|
1977 exec 'hi elixirUnusedVariable' . s:fg_foreground . s:ft_bold
|
|
1978 exec 'hi elixirInclude' . s:fg_purple
|
|
1979 exec 'hi elixirStringDelimiter' . s:fg_olive
|
|
1980 exec 'hi elixirKeyword' . s:fg_purple . s:ft_bold
|
|
1981 exec 'hi elixirFunctionDeclaration' . s:fg_aqua . s:ft_bold
|
|
1982 exec 'hi elixirBlockDefinition' . s:fg_pink
|
|
1983 exec 'hi elixirDefine' . s:fg_pink
|
|
1984 exec 'hi elixirStructDefine' . s:fg_pink
|
|
1985 exec 'hi elixirPrivateDefine' . s:fg_pink
|
|
1986 exec 'hi elixirModuleDefine' . s:fg_pink
|
|
1987 exec 'hi elixirProtocolDefine' . s:fg_pink
|
|
1988 exec 'hi elixirImplDefine' . s:fg_pink
|
|
1989 exec 'hi elixirModuleDeclaration' . s:fg_aqua . s:ft_bold
|
|
1990 exec 'hi elixirDocString' . s:fg_olive
|
|
1991 exec 'hi elixirDocTest' . s:fg_green . s:ft_bold
|
|
1992
|
|
1993 " Erlang Highlighting
|
|
1994 exec 'hi erlangBIF' . s:fg_purple . s:ft_bold
|
|
1995 exec 'hi erlangBracket' . s:fg_pink
|
|
1996 exec 'hi erlangLocalFuncCall' . s:fg_foreground
|
|
1997 exec 'hi erlangVariable' . s:fg_foreground
|
|
1998 exec 'hi erlangAtom' . s:fg_navy
|
|
1999 exec 'hi erlangAttribute' . s:fg_blue . s:ft_bold
|
|
2000 exec 'hi erlangRecordDef' . s:fg_blue . s:ft_bold
|
|
2001 exec 'hi erlangRecord' . s:fg_blue
|
|
2002 exec 'hi erlangRightArrow' . s:fg_blue . s:ft_bold
|
|
2003 exec 'hi erlangStringModifier' . s:fg_olive . s:ft_bold
|
|
2004 exec 'hi erlangInclude' . s:fg_blue . s:ft_bold
|
|
2005 exec 'hi erlangKeyword' . s:fg_pink
|
|
2006 exec 'hi erlangGlobalFuncCall' . s:fg_foreground
|
|
2007
|
|
2008 " Cucumber Highlighting
|
|
2009 exec 'hi cucumberFeature' . s:fg_blue . s:ft_bold
|
|
2010 exec 'hi cucumberBackground' . s:fg_pink . s:ft_bold
|
|
2011 exec 'hi cucumberScenario' . s:fg_pink . s:ft_bold
|
|
2012 exec 'hi cucumberGiven' . s:fg_orange
|
|
2013 exec 'hi cucumberGivenAnd' . s:fg_blue
|
|
2014 exec 'hi cucumberThen' . s:fg_orange
|
|
2015 exec 'hi cucumberThenAnd' . s:fg_blue
|
|
2016 exec 'hi cucumberWhen' . s:fg_purple . s:ft_bold
|
|
2017 exec 'hi cucumberScenarioOutline' . s:fg_pink . s:ft_bold
|
|
2018 exec 'hi cucumberExamples' . s:fg_aqua
|
|
2019 exec 'hi cucumberTags' . s:fg_aqua
|
|
2020 exec 'hi cucumberPlaceholder' . s:fg_aqua
|
|
2021
|
|
2022 " Ada Highlighting
|
|
2023 exec 'hi adaInc' . s:fg_aqua . s:ft_bold
|
|
2024 exec 'hi adaSpecial' . s:fg_aqua . s:ft_bold
|
|
2025 exec 'hi adaKeyword' . s:fg_pink
|
|
2026 exec 'hi adaBegin' . s:fg_pink
|
|
2027 exec 'hi adaEnd' . s:fg_pink
|
|
2028 exec 'hi adaTypedef' . s:fg_navy . s:ft_bold
|
|
2029 exec 'hi adaAssignment' . s:fg_aqua . s:ft_bold
|
|
2030 exec 'hi adaAttribute' . s:fg_green
|
|
2031
|
|
2032 " COBOL Highlighting
|
|
2033 exec 'hi cobolMarker' . s:fg_comment . s:bg_cursorline
|
|
2034 exec 'hi cobolLine' . s:fg_foreground
|
|
2035 exec 'hi cobolReserved' . s:fg_blue
|
|
2036 exec 'hi cobolDivision' . s:fg_pink . s:ft_bold
|
|
2037 exec 'hi cobolDivisionName' . s:fg_pink . s:ft_bold
|
|
2038 exec 'hi cobolSection' . s:fg_navy . s:ft_bold
|
|
2039 exec 'hi cobolSectionName' . s:fg_navy . s:ft_bold
|
|
2040 exec 'hi cobolParagraph' . s:fg_purple
|
|
2041 exec 'hi cobolParagraphName' . s:fg_purple
|
|
2042 exec 'hi cobolDeclA' . s:fg_purple
|
|
2043 exec 'hi cobolDecl' . s:fg_green
|
|
2044 exec 'hi cobolCALLs' . s:fg_aqua . s:ft_bold
|
|
2045 exec 'hi cobolEXECs' . s:fg_aqua . s:ft_bold
|
|
2046
|
|
2047 " GNU sed highlighting
|
|
2048 exec 'hi sedST' . s:fg_purple . s:ft_bold
|
|
2049 exec 'hi sedFlag' . s:fg_purple . s:ft_bold
|
|
2050 exec 'hi sedRegexp47' . s:fg_pink
|
|
2051 exec 'hi sedRegexpMeta' . s:fg_blue . s:ft_bold
|
|
2052 exec 'hi sedReplacement47' . s:fg_olive
|
|
2053 exec 'hi sedReplaceMeta' . s:fg_orange . s:ft_bold
|
|
2054 exec 'hi sedAddress' . s:fg_pink
|
|
2055 exec 'hi sedFunction' . s:fg_aqua . s:ft_bold
|
|
2056 exec 'hi sedBranch' . s:fg_green . s:ft_bold
|
|
2057 exec 'hi sedLabel' . s:fg_green . s:ft_bold
|
|
2058
|
|
2059 " GNU awk highlighting
|
|
2060 exec 'hi awkPatterns' . s:fg_pink . s:ft_bold
|
|
2061 exec 'hi awkSearch' . s:fg_pink
|
|
2062 exec 'hi awkRegExp' . s:fg_blue . s:ft_bold
|
|
2063 exec 'hi awkCharClass' . s:fg_blue . s:ft_bold
|
|
2064 exec 'hi awkFieldVars' . s:fg_green . s:ft_bold
|
|
2065 exec 'hi awkStatement' . s:fg_blue . s:ft_bold
|
|
2066 exec 'hi awkFunction' . s:fg_blue
|
|
2067 exec 'hi awkVariables' . s:fg_green . s:ft_bold
|
|
2068 exec 'hi awkArrayElement' . s:fg_orange
|
|
2069 exec 'hi awkOperator' . s:fg_foreground
|
|
2070 exec 'hi awkBoolLogic' . s:fg_foreground
|
|
2071 exec 'hi awkExpression' . s:fg_foreground
|
|
2072 exec 'hi awkSpecialPrintf' . s:fg_olive . s:ft_bold
|
|
2073
|
|
2074 " Elm highlighting
|
|
2075 exec 'hi elmImport' . s:fg_navy
|
|
2076 exec 'hi elmAlias' . s:fg_aqua
|
|
2077 exec 'hi elmType' . s:fg_pink
|
|
2078 exec 'hi elmOperator' . s:fg_aqua . s:ft_bold
|
|
2079 exec 'hi elmBraces' . s:fg_aqua . s:ft_bold
|
|
2080 exec 'hi elmTypedef' . s:fg_blue . s:ft_bold
|
|
2081 exec 'hi elmTopLevelDecl' . s:fg_green . s:ft_bold
|
|
2082
|
|
2083 " Purescript highlighting
|
|
2084 exec 'hi purescriptModuleKeyword' . s:fg_navy
|
|
2085 exec 'hi purescriptImportKeyword' . s:fg_navy
|
|
2086 exec 'hi purescriptModuleName' . s:fg_pink
|
|
2087 exec 'hi purescriptOperator' . s:fg_aqua . s:ft_bold
|
|
2088 exec 'hi purescriptType' . s:fg_pink
|
|
2089 exec 'hi purescriptTypeVar' . s:fg_navy
|
|
2090 exec 'hi purescriptStructure' . s:fg_blue . s:ft_bold
|
|
2091 exec 'hi purescriptLet' . s:fg_blue . s:ft_bold
|
|
2092 exec 'hi purescriptFunction' . s:fg_green . s:ft_bold
|
|
2093 exec 'hi purescriptDelimiter' . s:fg_aqua . s:ft_bold
|
|
2094 exec 'hi purescriptStatement' . s:fg_purple . s:ft_bold
|
|
2095 exec 'hi purescriptConstructor' . s:fg_pink
|
|
2096 exec 'hi purescriptWhere' . s:fg_purple . s:ft_bold
|
|
2097
|
|
2098 " F# highlighting
|
|
2099 exec 'hi fsharpTypeName' . s:fg_pink
|
|
2100 exec 'hi fsharpCoreClass' . s:fg_pink
|
|
2101 exec 'hi fsharpType' . s:fg_pink
|
|
2102 exec 'hi fsharpKeyword' . s:fg_blue . s:ft_bold
|
|
2103 exec 'hi fsharpOperator' . s:fg_aqua . s:ft_bold
|
|
2104 exec 'hi fsharpBoolean' . s:fg_green . s:ft_bold
|
|
2105 exec 'hi fsharpFormat' . s:fg_foreground
|
|
2106 exec 'hi fsharpLinq' . s:fg_blue
|
|
2107 exec 'hi fsharpKeyChar' . s:fg_aqua . s:ft_bold
|
|
2108 exec 'hi fsharpOption' . s:fg_orange
|
|
2109 exec 'hi fsharpCoreMethod' . s:fg_purple
|
|
2110 exec 'hi fsharpAttrib' . s:fg_orange
|
|
2111 exec 'hi fsharpModifier' . s:fg_aqua
|
|
2112 exec 'hi fsharpOpen' . s:fg_red
|
|
2113
|
|
2114 " ASN.1 highlighting
|
|
2115 exec 'hi asnExternal' . s:fg_green . s:ft_bold
|
|
2116 exec 'hi asnTagModifier' . s:fg_purple
|
|
2117 exec 'hi asnBraces' . s:fg_aqua . s:ft_bold
|
|
2118 exec 'hi asnDefinition' . s:fg_foreground
|
|
2119 exec 'hi asnStructure' . s:fg_blue
|
|
2120 exec 'hi asnType' . s:fg_pink
|
|
2121 exec 'hi asnTypeInfo' . s:fg_aqua . s:ft_bold
|
|
2122 exec 'hi asnFieldOption' . s:fg_purple
|
|
2123
|
|
2124 " }}}
|
|
2125
|
|
2126 " Plugin: Netrw
|
|
2127 exec 'hi netrwVersion' . s:fg_red
|
|
2128 exec 'hi netrwList' . s:fg_pink
|
|
2129 exec 'hi netrwHidePat' . s:fg_olive
|
|
2130 exec 'hi netrwQuickHelp' . s:fg_blue
|
|
2131 exec 'hi netrwHelpCmd' . s:fg_blue
|
|
2132 exec 'hi netrwDir' . s:fg_aqua . s:ft_bold
|
|
2133 exec 'hi netrwClassify' . s:fg_pink
|
|
2134 exec 'hi netrwExe' . s:fg_green
|
|
2135 exec 'hi netrwSuffixes' . s:fg_comment
|
|
2136 exec 'hi netrwTreeBar' . s:fg_linenumber_fg
|
|
2137
|
|
2138 " Plugin: NERDTree
|
|
2139 exec 'hi NERDTreeUp' . s:fg_comment
|
|
2140 exec 'hi NERDTreeHelpCommand' . s:fg_pink
|
|
2141 exec 'hi NERDTreeHelpTitle' . s:fg_blue . s:ft_bold
|
|
2142 exec 'hi NERDTreeHelpKey' . s:fg_pink
|
|
2143 exec 'hi NERDTreeHelp' . s:fg_foreground
|
|
2144 exec 'hi NERDTreeToggleOff' . s:fg_red
|
|
2145 exec 'hi NERDTreeToggleOn' . s:fg_green
|
|
2146 exec 'hi NERDTreeDir' . s:fg_blue . s:ft_bold
|
|
2147 exec 'hi NERDTreeDirSlash' . s:fg_pink
|
|
2148 exec 'hi NERDTreeFile' . s:fg_foreground
|
|
2149 exec 'hi NERDTreeExecFile' . s:fg_green
|
|
2150 exec 'hi NERDTreeOpenable' . s:fg_aqua . s:ft_bold
|
|
2151 exec 'hi NERDTreeClosable' . s:fg_pink
|
|
2152
|
|
2153 " Plugin: Tagbar
|
|
2154 exec 'hi TagbarHelpTitle' . s:fg_blue . s:ft_bold
|
|
2155 exec 'hi TagbarHelp' . s:fg_foreground
|
|
2156 exec 'hi TagbarKind' . s:fg_pink
|
|
2157 exec 'hi TagbarSignature' . s:fg_aqua
|
|
2158
|
|
2159 " Plugin: Vimdiff
|
|
2160 exec 'hi DiffAdd' . s:fg_diffadd_fg . s:bg_diffadd_bg . s:ft_none
|
|
2161 exec 'hi DiffChange' . s:fg_diffchange_fg . s:bg_diffchange_bg . s:ft_none
|
|
2162 exec 'hi DiffDelete' . s:fg_diffdelete_fg . s:bg_diffdelete_bg . s:ft_none
|
|
2163 exec 'hi DiffText' . s:fg_difftext_fg . s:bg_difftext_bg . s:ft_none
|
|
2164
|
|
2165 " Plugin: AGit
|
|
2166 exec 'hi agitHead' . s:fg_green . s:ft_bold
|
|
2167 exec 'hi agitHeader' . s:fg_olive
|
|
2168 exec 'hi agitStatAdded' . s:fg_diffadd_fg
|
|
2169 exec 'hi agitStatRemoved' . s:fg_diffdelete_fg
|
|
2170 exec 'hi agitDiffAdd' . s:fg_diffadd_fg
|
|
2171 exec 'hi agitDiffRemove' . s:fg_diffdelete_fg
|
|
2172 exec 'hi agitDiffHeader' . s:fg_pink
|
|
2173 exec 'hi agitDiff' . s:fg_foreground
|
|
2174 exec 'hi agitDiffIndex' . s:fg_purple
|
|
2175 exec 'hi agitDiffFileName' . s:fg_aqua
|
|
2176 exec 'hi agitLog' . s:fg_foreground
|
|
2177 exec 'hi agitAuthorMark' . s:fg_olive
|
|
2178 exec 'hi agitDateMark' . s:fg_comment
|
|
2179 exec 'hi agitHeaderLabel' . s:fg_aqua
|
|
2180 exec 'hi agitDate' . s:fg_aqua
|
|
2181 exec 'hi agitTree' . s:fg_pink
|
|
2182 exec 'hi agitRef' . s:fg_blue . s:ft_bold
|
|
2183 exec 'hi agitRemote' . s:fg_purple . s:ft_bold
|
|
2184 exec 'hi agitTag' . s:fg_orange . s:ft_bold
|
|
2185
|
|
2186 " Plugin: Spell Checking
|
|
2187 exec 'hi SpellBad' . s:fg_foreground . s:bg_spellbad
|
|
2188 exec 'hi SpellCap' . s:fg_foreground . s:bg_spellcap
|
|
2189 exec 'hi SpellRare' . s:fg_foreground . s:bg_spellrare
|
|
2190 exec 'hi SpellLocal' . s:fg_foreground . s:bg_spelllocal
|
|
2191
|
|
2192 " Plugin: Indent Guides
|
|
2193 exec 'hi IndentGuidesOdd' . s:bg_background
|
|
2194 exec 'hi IndentGuidesEven' . s:bg_cursorline
|
|
2195
|
|
2196 " Plugin: Startify
|
|
2197 exec 'hi StartifyFile' . s:fg_blue . s:ft_bold
|
|
2198 exec 'hi StartifyNumber' . s:fg_orange
|
|
2199 exec 'hi StartifyHeader' . s:fg_comment
|
|
2200 exec 'hi StartifySection' . s:fg_pink
|
|
2201 exec 'hi StartifyPath' . s:fg_foreground
|
|
2202 exec 'hi StartifySlash' . s:fg_navy
|
|
2203 exec 'hi StartifyBracket' . s:fg_aqua
|
|
2204 exec 'hi StartifySpecial' . s:fg_aqua
|
|
2205
|
|
2206 " Plugin: Signify
|
|
2207 exec 'hi SignifyLineChange' . s:fg_diffchange_fg
|
|
2208 exec 'hi SignifySignChange' . s:fg_diffchange_fg
|
|
2209 exec 'hi SignifyLineAdd' . s:fg_diffadd_fg
|
|
2210 exec 'hi SignifySignAdd' . s:fg_diffadd_fg
|
|
2211 exec 'hi SignifyLineDelete' . s:fg_diffdelete_fg
|
|
2212 exec 'hi SignifySignDelete' . s:fg_diffdelete_fg
|
|
2213
|
|
2214 " Git commit message
|
|
2215 exec 'hi gitcommitSummary' . s:fg_blue
|
|
2216 exec 'hi gitcommitHeader' . s:fg_green . s:ft_bold
|
|
2217 exec 'hi gitcommitSelectedType' . s:fg_blue
|
|
2218 exec 'hi gitcommitSelectedFile' . s:fg_pink
|
|
2219 exec 'hi gitcommitUntrackedFile' . s:fg_diffdelete_fg
|
|
2220 exec 'hi gitcommitBranch' . s:fg_aqua . s:ft_bold
|
|
2221 exec 'hi gitcommitDiscardedType' . s:fg_diffdelete_fg
|
|
2222 exec 'hi gitcommitDiff' . s:fg_comment
|
|
2223
|
|
2224 exec 'hi diffFile' . s:fg_blue
|
|
2225 exec 'hi diffSubname' . s:fg_comment
|
|
2226 exec 'hi diffIndexLine' . s:fg_comment
|
|
2227 exec 'hi diffAdded' . s:fg_diffadd_fg
|
|
2228 exec 'hi diffRemoved' . s:fg_diffdelete_fg
|
|
2229 exec 'hi diffLine' . s:fg_orange
|
|
2230 exec 'hi diffBDiffer' . s:fg_orange
|
|
2231 exec 'hi diffNewFile' . s:fg_comment
|
|
2232
|
|
2233 " Pluging: CoC
|
|
2234 exec 'hi CocFloating' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_none
|
|
2235 exec 'hi CocErrorFloat' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_none
|
|
2236 exec 'hi CocWarningFloat' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_none
|
|
2237 exec 'hi CocInfoFloat' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_none
|
|
2238 exec 'hi CocHintFloat' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_none
|
|
2239
|
|
2240 exec 'hi CocErrorHighlight' . s:fg_foreground . s:bg_spellbad
|
|
2241 exec 'hi CocWarningHighlight' . s:fg_foreground . s:bg_spellcap
|
|
2242 exec 'hi CocInfoHighlight' . s:fg_foreground . s:bg_spellcap
|
|
2243 exec 'hi CocHintHighlight' . s:fg_foreground . s:bg_spellcap
|
|
2244
|
|
2245 exec 'hi CocErrorSign' . s:fg_error_fg . s:bg_error_bg
|
|
2246 exec 'hi CocWarningSign' . s:fg_todo_fg . s:bg_todo_bg . s:ft_bold
|
|
2247 exec 'hi CocInfoSign' . s:fg_todo_fg . s:bg_todo_bg . s:ft_bold
|
|
2248 exec 'hi CocHintSign' . s:fg_todo_fg . s:bg_todo_bg . s:ft_bold
|
|
2249
|
|
2250 endfun
|
|
2251 " }}}
|
|
2252
|
|
2253 " ================================== MISC =====================================
|
|
2254 " Command to show theme information {{{
|
|
2255 fun! g:PaperColor()
|
|
2256 echom 'PaperColor Theme Framework'
|
|
2257 echom ' version ' . s:version
|
|
2258 echom ' by Nikyle Nguyen et al.'
|
|
2259 echom ' at https://github.com/NLKNguyen/papercolor-theme/'
|
|
2260 echom ' '
|
|
2261 echom 'Current theme: ' . s:theme_name
|
|
2262 echom ' ' . s:selected_theme['description']
|
|
2263 echom ' by ' . s:selected_theme['maintainer']
|
|
2264 echom ' at ' . s:selected_theme['source']
|
|
2265
|
|
2266 " TODO: add diff display for theme color names between 'default' and current
|
|
2267 " theme if it is a custom theme, i.e. child theme.
|
|
2268 endfun
|
|
2269
|
|
2270 " @brief command alias for g:PaperColor()
|
|
2271 command! -nargs=0 PaperColor :call g:PaperColor()
|
|
2272 " }}}
|
|
2273
|
|
2274 " =============================== MAIN ========================================
|
|
2275
|
|
2276 hi clear
|
|
2277 syntax reset
|
|
2278 let g:colors_name = "PaperColor"
|
|
2279
|
|
2280 call s:acquire_theme_data()
|
|
2281 call s:identify_color_mode()
|
|
2282
|
|
2283 call s:generate_theme_option_variables()
|
|
2284 call s:generate_language_option_variables()
|
|
2285
|
|
2286 call s:set_format_attributes()
|
|
2287 call s:set_overriding_colors()
|
|
2288
|
|
2289 call s:convert_colors()
|
|
2290 call s:set_color_variables()
|
|
2291
|
|
2292 call s:apply_syntax_highlightings()
|
|
2293
|
|
2294 " =============================================================================
|
|
2295 " Cheers!
|
|
2296 " vim: fdm=marker ff=unix
|