gruvbox.vim 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610
  1. " -----------------------------------------------------------------------------
  2. " File: gruvbox.vim
  3. " Description: Retro groove color scheme for Vim
  4. " Author: morhetz <morhetz@gmail.com>
  5. " Source: https://github.com/gruvbox-community/gruvbox
  6. " -----------------------------------------------------------------------------
  7. " Supporting code -------------------------------------------------------------
  8. " Initialisation: {{{
  9. if version > 580
  10. hi clear
  11. if exists("syntax_on")
  12. syntax reset
  13. endif
  14. endif
  15. let g:colors_name='gruvbox'
  16. if !(has('termguicolors') && &termguicolors) && !has('gui_running') && &t_Co != 256
  17. finish
  18. endif
  19. " }}}
  20. " Global Settings: {{{
  21. if !exists('g:gruvbox_bold')
  22. let g:gruvbox_bold=1
  23. endif
  24. if !exists('g:gruvbox_italic')
  25. if has('gui_running') || $TERM_ITALICS == 'true'
  26. let g:gruvbox_italic=1
  27. else
  28. let g:gruvbox_italic=0
  29. endif
  30. endif
  31. if !exists('g:gruvbox_undercurl')
  32. let g:gruvbox_undercurl=1
  33. endif
  34. if !exists('g:gruvbox_underline')
  35. let g:gruvbox_underline=1
  36. endif
  37. if !exists('g:gruvbox_inverse')
  38. let g:gruvbox_inverse=1
  39. endif
  40. if !exists('g:gruvbox_guisp_fallback') || index(['fg', 'bg'], g:gruvbox_guisp_fallback) == -1
  41. let g:gruvbox_guisp_fallback='NONE'
  42. endif
  43. if !exists('g:gruvbox_improved_strings')
  44. let g:gruvbox_improved_strings=0
  45. endif
  46. if !exists('g:gruvbox_improved_warnings')
  47. let g:gruvbox_improved_warnings=0
  48. endif
  49. if !exists('g:gruvbox_termcolors')
  50. let g:gruvbox_termcolors=256
  51. endif
  52. if !exists('g:gruvbox_invert_indent_guides')
  53. let g:gruvbox_invert_indent_guides=0
  54. endif
  55. if exists('g:gruvbox_contrast')
  56. echo 'g:gruvbox_contrast is deprecated; use g:gruvbox_contrast_light and g:gruvbox_contrast_dark instead'
  57. endif
  58. if !exists('g:gruvbox_contrast_dark')
  59. let g:gruvbox_contrast_dark='medium'
  60. endif
  61. if !exists('g:gruvbox_contrast_light')
  62. let g:gruvbox_contrast_light='medium'
  63. endif
  64. let s:is_dark=(&background == 'dark')
  65. " }}}
  66. " Palette Utility Functions: {{{
  67. function! s:Color(name, default, ...)
  68. " color already set, validate option
  69. if has_key(s:gb, a:name)
  70. let l:color = s:gb[a:name]
  71. if type(l:color) == type('')
  72. " gui color only
  73. let s:gb[a:name] = copy(a:default)
  74. let s:gb[a:name][0] = l:color
  75. return 1
  76. elseif type(l:color) == type(0)
  77. " terminal color only
  78. let s:gb[a:name] = copy(a:default)
  79. let s:gb[a:name][1] = l:color
  80. return 1
  81. elseif type(l:color) == type([])
  82. \ && len(l:color) == 2
  83. \ && type(l:color[0]) == type('')
  84. \ && type(l:color[1]) == type(0)
  85. " gui and terminal color
  86. return 1
  87. else
  88. " invalid value
  89. echo a:name 'is invalid, usage: let g:gruvbox_colors.color = (["#ffffff", 255]|"#ffffff"|255)'
  90. return 0
  91. endif
  92. endif
  93. " set default option
  94. let s:gb[a:name] = a:default
  95. return 1
  96. endfunction
  97. " }}}
  98. " Palette: {{{
  99. " get the global gruvbox palette options, if any
  100. let g:gruvbox_colors = get(g:, 'gruvbox_colors', {})
  101. " initialize the script palette
  102. let s:gb = copy(g:gruvbox_colors)
  103. let g:current_gruvbox_colors = s:gb
  104. " set palette default colors
  105. call s:Color('dark0_hard', ['#1d2021', 234]) " 29-32-33
  106. call s:Color('dark0', ['#282828', 235]) " 40-40-40
  107. call s:Color('dark0_soft', ['#32302f', 236]) " 50-48-47
  108. call s:Color('dark1', ['#3c3836', 237]) " 60-56-54
  109. call s:Color('dark2', ['#504945', 239]) " 80-73-69
  110. call s:Color('dark3', ['#665c54', 241]) " 102-92-84
  111. call s:Color('dark4', ['#7c6f64', 243]) " 124-111-100
  112. call s:Color('dark4_256', ['#7c6f64', 243]) " 124-111-100
  113. call s:Color('gray_245', ['#928374', 245]) " 146-131-116
  114. call s:Color('gray_244', ['#928374', 244]) " 146-131-116
  115. call s:Color('light0_hard', ['#f9f5d7', 230]) " 249-245-215
  116. call s:Color('light0', ['#fbf1c7', 229]) " 253-244-193
  117. call s:Color('light0_soft', ['#f2e5bc', 228]) " 242-229-188
  118. call s:Color('light1', ['#ebdbb2', 223]) " 235-219-178
  119. call s:Color('light2', ['#d5c4a1', 250]) " 213-196-161
  120. call s:Color('light3', ['#bdae93', 248]) " 189-174-147
  121. call s:Color('light4', ['#a89984', 246]) " 168-153-132
  122. call s:Color('light4_256', ['#a89984', 246]) " 168-153-132
  123. call s:Color('bright_red', ['#fb4934', 167]) " 251-73-52
  124. call s:Color('bright_green', ['#b8bb26', 142]) " 184-187-38
  125. call s:Color('bright_yellow', ['#fabd2f', 214]) " 250-189-47
  126. call s:Color('bright_blue', ['#83a598', 109]) " 131-165-152
  127. call s:Color('bright_purple', ['#d3869b', 175]) " 211-134-155
  128. call s:Color('bright_aqua', ['#8ec07c', 108]) " 142-192-124
  129. call s:Color('bright_orange', ['#fe8019', 208]) " 254-128-25
  130. call s:Color('neutral_red', ['#cc241d', 124]) " 204-36-29
  131. call s:Color('neutral_green', ['#98971a', 106]) " 152-151-26
  132. call s:Color('neutral_yellow', ['#d79921', 172]) " 215-153-33
  133. call s:Color('neutral_blue', ['#458588', 66]) " 69-133-136
  134. call s:Color('neutral_purple', ['#b16286', 132]) " 177-98-134
  135. call s:Color('neutral_aqua', ['#689d6a', 72]) " 104-157-106
  136. call s:Color('neutral_orange', ['#d65d0e', 166]) " 214-93-14
  137. call s:Color('faded_red', ['#9d0006', 88]) " 157-0-6
  138. call s:Color('faded_green', ['#79740e', 100]) " 121-116-14
  139. call s:Color('faded_yellow', ['#b57614', 136]) " 181-118-20
  140. call s:Color('faded_blue', ['#076678', 24]) " 7-102-120
  141. call s:Color('faded_purple', ['#8f3f71', 96]) " 143-63-113
  142. call s:Color('faded_aqua', ['#427b58', 65]) " 66-123-88
  143. call s:Color('faded_orange', ['#af3a03', 130]) " 175-58-3
  144. " }}}
  145. " Setup Emphasis: {{{
  146. let s:bold = 'bold,'
  147. if g:gruvbox_bold == 0
  148. let s:bold = ''
  149. endif
  150. let s:italic = 'italic,'
  151. if g:gruvbox_italic == 0
  152. let s:italic = ''
  153. endif
  154. let s:underline = 'underline,'
  155. if g:gruvbox_underline == 0
  156. let s:underline = ''
  157. endif
  158. let s:undercurl = 'undercurl,'
  159. if g:gruvbox_undercurl == 0
  160. let s:undercurl = ''
  161. endif
  162. let s:inverse = 'inverse,'
  163. if g:gruvbox_inverse == 0
  164. let s:inverse = ''
  165. endif
  166. " }}}
  167. " Setup Colors: {{{
  168. let s:vim_bg = ['bg', 'bg']
  169. let s:vim_fg = ['fg', 'fg']
  170. let s:none = ['NONE', 'NONE']
  171. " determine relative colors
  172. if s:is_dark
  173. let s:bg0 = s:gb.dark0
  174. if g:gruvbox_contrast_dark == 'soft'
  175. let s:bg0 = s:gb.dark0_soft
  176. elseif g:gruvbox_contrast_dark == 'hard'
  177. let s:bg0 = s:gb.dark0_hard
  178. endif
  179. let s:bg1 = s:gb.dark1
  180. let s:bg2 = s:gb.dark2
  181. let s:bg3 = s:gb.dark3
  182. let s:bg4 = s:gb.dark4
  183. let s:gray = s:gb.gray_245
  184. let s:fg0 = s:gb.light0
  185. let s:fg1 = s:gb.light1
  186. let s:fg2 = s:gb.light2
  187. let s:fg3 = s:gb.light3
  188. let s:fg4 = s:gb.light4
  189. let s:fg4_256 = s:gb.light4_256
  190. let s:red = s:gb.bright_red
  191. let s:green = s:gb.bright_green
  192. let s:yellow = s:gb.bright_yellow
  193. let s:blue = s:gb.bright_blue
  194. let s:purple = s:gb.bright_purple
  195. let s:aqua = s:gb.bright_aqua
  196. let s:orange = s:gb.bright_orange
  197. else
  198. let s:bg0 = s:gb.light0
  199. if g:gruvbox_contrast_light == 'soft'
  200. let s:bg0 = s:gb.light0_soft
  201. elseif g:gruvbox_contrast_light == 'hard'
  202. let s:bg0 = s:gb.light0_hard
  203. endif
  204. let s:bg1 = s:gb.light1
  205. let s:bg2 = s:gb.light2
  206. let s:bg3 = s:gb.light3
  207. let s:bg4 = s:gb.light4
  208. let s:gray = s:gb.gray_244
  209. let s:fg0 = s:gb.dark0
  210. let s:fg1 = s:gb.dark1
  211. let s:fg2 = s:gb.dark2
  212. let s:fg3 = s:gb.dark3
  213. let s:fg4 = s:gb.dark4
  214. let s:fg4_256 = s:gb.dark4_256
  215. let s:red = s:gb.faded_red
  216. let s:green = s:gb.faded_green
  217. let s:yellow = s:gb.faded_yellow
  218. let s:blue = s:gb.faded_blue
  219. let s:purple = s:gb.faded_purple
  220. let s:aqua = s:gb.faded_aqua
  221. let s:orange = s:gb.faded_orange
  222. endif
  223. " reset to 16 colors fallback
  224. if g:gruvbox_termcolors == 16
  225. let s:bg0[1] = 0
  226. let s:fg4[1] = 7
  227. let s:gray[1] = 8
  228. let s:red[1] = 9
  229. let s:green[1] = 10
  230. let s:yellow[1] = 11
  231. let s:blue[1] = 12
  232. let s:purple[1] = 13
  233. let s:aqua[1] = 14
  234. let s:fg1[1] = 15
  235. endif
  236. " save current relative colors back to palette dictionary
  237. call s:Color('bg0', s:bg0)
  238. call s:Color('bg1', s:bg1)
  239. call s:Color('bg2', s:bg2)
  240. call s:Color('bg3', s:bg3)
  241. call s:Color('bg4', s:bg4)
  242. call s:Color('gray', s:gray)
  243. call s:Color('fg0', s:fg0)
  244. call s:Color('fg1', s:fg1)
  245. call s:Color('fg2', s:fg2)
  246. call s:Color('fg3', s:fg3)
  247. call s:Color('fg4', s:fg4)
  248. call s:Color('fg4_256', s:fg4_256)
  249. call s:Color('red', s:red)
  250. call s:Color('green', s:green)
  251. call s:Color('yellow', s:yellow)
  252. call s:Color('blue', s:blue)
  253. call s:Color('purple', s:purple)
  254. call s:Color('aqua', s:aqua)
  255. call s:Color('orange', s:orange)
  256. " }}}
  257. " Setup Terminal Colors For Neovim: {{{
  258. if has('nvim')
  259. let g:terminal_color_0 = s:gb.bg0[0]
  260. let g:terminal_color_8 = s:gb.gray[0]
  261. let g:terminal_color_1 = s:gb.neutral_red[0]
  262. let g:terminal_color_9 = s:gb.red[0]
  263. let g:terminal_color_2 = s:gb.neutral_green[0]
  264. let g:terminal_color_10 = s:gb.green[0]
  265. let g:terminal_color_3 = s:gb.neutral_yellow[0]
  266. let g:terminal_color_11 = s:gb.yellow[0]
  267. let g:terminal_color_4 = s:gb.neutral_blue[0]
  268. let g:terminal_color_12 = s:gb.blue[0]
  269. let g:terminal_color_5 = s:gb.neutral_purple[0]
  270. let g:terminal_color_13 = s:gb.purple[0]
  271. let g:terminal_color_6 = s:gb.neutral_aqua[0]
  272. let g:terminal_color_14 = s:gb.aqua[0]
  273. let g:terminal_color_7 = s:gb.fg4[0]
  274. let g:terminal_color_15 = s:gb.fg1[0]
  275. endif
  276. " }}}
  277. " Setup Terminal Colors For Vim with termguicolors: {{{
  278. if exists('*term_setansicolors')
  279. let g:terminal_ansi_colors = repeat([0], 16)
  280. let g:terminal_ansi_colors[0] = s:gb.bg0[0]
  281. let g:terminal_ansi_colors[8] = s:gb.gray[0]
  282. let g:terminal_ansi_colors[1] = s:gb.neutral_red[0]
  283. let g:terminal_ansi_colors[9] = s:gb.red[0]
  284. let g:terminal_ansi_colors[2] = s:gb.neutral_green[0]
  285. let g:terminal_ansi_colors[10] = s:gb.green[0]
  286. let g:terminal_ansi_colors[3] = s:gb.neutral_yellow[0]
  287. let g:terminal_ansi_colors[11] = s:gb.yellow[0]
  288. let g:terminal_ansi_colors[4] = s:gb.neutral_blue[0]
  289. let g:terminal_ansi_colors[12] = s:gb.blue[0]
  290. let g:terminal_ansi_colors[5] = s:gb.neutral_purple[0]
  291. let g:terminal_ansi_colors[13] = s:gb.purple[0]
  292. let g:terminal_ansi_colors[6] = s:gb.neutral_aqua[0]
  293. let g:terminal_ansi_colors[14] = s:gb.aqua[0]
  294. let g:terminal_ansi_colors[7] = s:gb.fg4[0]
  295. let g:terminal_ansi_colors[15] = s:gb.fg1[0]
  296. endif
  297. " }}}
  298. " Overload Setting: {{{
  299. let s:hls_cursor = s:gb.orange
  300. if exists('g:gruvbox_hls_cursor')
  301. let s:hls_cursor = get(s:gb, g:gruvbox_hls_cursor)
  302. endif
  303. let s:hls_highlight = s:gb.yellow
  304. if exists('g:gruvbox_hls_highlight')
  305. let s:hls_highlight = get(s:gb, g:gruvbox_hls_highlight)
  306. endif
  307. let s:number_column = s:none
  308. if exists('g:gruvbox_number_column')
  309. let s:number_column = get(s:gb, g:gruvbox_number_column)
  310. endif
  311. let s:sign_column = s:gb.bg1
  312. if exists('g:gruvbox_sign_column')
  313. let s:sign_column = get(s:gb, g:gruvbox_sign_column)
  314. endif
  315. let s:color_column = s:gb.bg1
  316. if exists('g:gruvbox_color_column')
  317. let s:color_column = get(s:gb, g:gruvbox_color_column)
  318. endif
  319. let s:vert_split = s:gb.bg0
  320. if exists('g:gruvbox_vert_split')
  321. let s:vert_split = get(s:gb, g:gruvbox_vert_split)
  322. endif
  323. let s:invert_signs = ''
  324. if exists('g:gruvbox_invert_signs')
  325. if g:gruvbox_invert_signs == 1
  326. let s:invert_signs = s:inverse
  327. endif
  328. endif
  329. let s:invert_selection = s:inverse
  330. if exists('g:gruvbox_invert_selection')
  331. if g:gruvbox_invert_selection == 0
  332. let s:invert_selection = ''
  333. endif
  334. endif
  335. let s:invert_tabline = ''
  336. if exists('g:gruvbox_invert_tabline')
  337. if g:gruvbox_invert_tabline == 1
  338. let s:invert_tabline = s:inverse
  339. endif
  340. endif
  341. let s:tabline_sel = s:gb.green
  342. if exists('g:gruvbox_tabline_sel')
  343. let s:tabline_sel = get(s:gb, g:gruvbox_tabline_sel)
  344. endif
  345. let s:italicize_comments = s:italic
  346. if exists('g:gruvbox_italicize_comments')
  347. if g:gruvbox_italicize_comments == 0
  348. let s:italicize_comments = ''
  349. endif
  350. endif
  351. let s:italicize_strings = ''
  352. if exists('g:gruvbox_italicize_strings')
  353. if g:gruvbox_italicize_strings == 1
  354. let s:italicize_strings = s:italic
  355. endif
  356. endif
  357. " }}}
  358. " Highlighting Function: {{{
  359. function! s:HL(group, fg, ...)
  360. " Arguments: group, guifg, guibg, gui, guisp
  361. " foreground
  362. let fg = a:fg
  363. " background
  364. if a:0 >= 1
  365. let bg = a:1
  366. else
  367. let bg = s:none
  368. endif
  369. " emphasis
  370. if a:0 >= 2 && strlen(a:2)
  371. let emstr = a:2
  372. else
  373. let emstr = 'NONE,'
  374. endif
  375. " special fallback
  376. if a:0 >= 3
  377. if g:gruvbox_guisp_fallback != 'NONE'
  378. let fg = a:3
  379. endif
  380. " bg fallback mode should invert higlighting
  381. if g:gruvbox_guisp_fallback == 'bg'
  382. let emstr .= 'inverse,'
  383. endif
  384. endif
  385. let histring = [ 'hi', a:group,
  386. \ 'guifg=' . fg[0], 'ctermfg=' . fg[1],
  387. \ 'guibg=' . bg[0], 'ctermbg=' . bg[1],
  388. \ 'gui=' . emstr[:-2], 'cterm=' . emstr[:-2]
  389. \ ]
  390. " special
  391. if a:0 >= 3
  392. call add(histring, 'guisp=' . a:3[0])
  393. endif
  394. execute join(histring, ' ')
  395. endfunction
  396. " }}}
  397. " Gruvbox Hi Groups: {{{
  398. " memoize common hi groups
  399. call s:HL('GruvboxFg0', s:gb.fg0)
  400. call s:HL('GruvboxFg1', s:gb.fg1)
  401. call s:HL('GruvboxFg2', s:gb.fg2)
  402. call s:HL('GruvboxFg3', s:gb.fg3)
  403. call s:HL('GruvboxFg4', s:gb.fg4)
  404. call s:HL('GruvboxGray', s:gb.gray)
  405. call s:HL('GruvboxBg0', s:gb.bg0)
  406. call s:HL('GruvboxBg1', s:gb.bg1)
  407. call s:HL('GruvboxBg2', s:gb.bg2)
  408. call s:HL('GruvboxBg3', s:gb.bg3)
  409. call s:HL('GruvboxBg4', s:gb.bg4)
  410. call s:HL('GruvboxRed', s:gb.red)
  411. call s:HL('GruvboxRedBold', s:gb.red, s:none, s:bold)
  412. call s:HL('GruvboxGreen', s:gb.green)
  413. call s:HL('GruvboxGreenBold', s:gb.green, s:none, s:bold)
  414. call s:HL('GruvboxYellow', s:gb.yellow)
  415. call s:HL('GruvboxYellowBold', s:gb.yellow, s:none, s:bold)
  416. call s:HL('GruvboxBlue', s:gb.blue)
  417. call s:HL('GruvboxBlueBold', s:gb.blue, s:none, s:bold)
  418. call s:HL('GruvboxPurple', s:gb.purple)
  419. call s:HL('GruvboxPurpleBold', s:gb.purple, s:none, s:bold)
  420. call s:HL('GruvboxAqua', s:gb.aqua)
  421. call s:HL('GruvboxAquaBold', s:gb.aqua, s:none, s:bold)
  422. call s:HL('GruvboxOrange', s:gb.orange)
  423. call s:HL('GruvboxOrangeBold', s:gb.orange, s:none, s:bold)
  424. call s:HL('GruvboxRedSign', s:gb.red, s:sign_column, s:invert_signs)
  425. call s:HL('GruvboxGreenSign', s:gb.green, s:sign_column, s:invert_signs)
  426. call s:HL('GruvboxYellowSign', s:gb.yellow, s:sign_column, s:invert_signs)
  427. call s:HL('GruvboxBlueSign', s:gb.blue, s:sign_column, s:invert_signs)
  428. call s:HL('GruvboxPurpleSign', s:gb.purple, s:sign_column, s:invert_signs)
  429. call s:HL('GruvboxAquaSign', s:gb.aqua, s:sign_column, s:invert_signs)
  430. call s:HL('GruvboxOrangeSign', s:gb.orange, s:sign_column, s:invert_signs)
  431. " }}}
  432. " Vanilla colorscheme ---------------------------------------------------------
  433. " General UI: {{{
  434. " Normal text
  435. call s:HL('Normal', s:gb.fg1, s:gb.bg0)
  436. " Correct background (see issue #7):
  437. " --- Problem with changing between dark and light on 256 color terminal
  438. " --- https://github.com/morhetz/gruvbox/issues/7
  439. if exists('v:vim_did_enter')
  440. let g:gruvbox_vim_did_enter = v:vim_did_enter
  441. else
  442. augroup GruvboxVimEnter
  443. au!
  444. autocmd VimEnter * let g:gruvbox_vim_did_enter = 1
  445. augroup End
  446. endif
  447. if get(g:, 'gruvbox_vim_did_enter', 0)
  448. if s:is_dark
  449. set background=dark
  450. else
  451. set background=light
  452. endif
  453. endif
  454. if version >= 700
  455. " Screen line that the cursor is
  456. call s:HL('CursorLine', s:none, s:gb.bg1)
  457. " Screen column that the cursor is
  458. hi! link CursorColumn CursorLine
  459. " Tab pages line filler
  460. call s:HL('TabLineFill', s:gb.bg4, s:gb.bg1, s:invert_tabline)
  461. " Active tab page label
  462. call s:HL('TabLineSel', s:tabline_sel, s:gb.bg1, s:invert_tabline)
  463. " Not active tab page label
  464. hi! link TabLine TabLineFill
  465. " Match paired bracket under the cursor
  466. call s:HL('MatchParen', s:none, s:gb.bg3, s:bold)
  467. endif
  468. if version >= 703
  469. " Highlighted screen columns
  470. call s:HL('ColorColumn', s:none, s:color_column)
  471. " Concealed element: \lambda → λ
  472. call s:HL('Conceal', s:gb.blue, s:none)
  473. " Line number of CursorLine
  474. call s:HL('CursorLineNr', s:gb.yellow, s:gb.bg1)
  475. endif
  476. hi! link NonText GruvboxBg2
  477. hi! link SpecialKey GruvboxFg4
  478. call s:HL('Visual', s:none, s:gb.bg3, s:invert_selection)
  479. hi! link VisualNOS Visual
  480. call s:HL('Search', s:hls_highlight, s:gb.bg0, s:inverse)
  481. call s:HL('IncSearch', s:hls_cursor, s:gb.bg0, s:inverse)
  482. call s:HL('QuickFixLine', s:gb.bg0, s:gb.yellow, s:bold)
  483. call s:HL('Underlined', s:gb.blue, s:none, s:underline)
  484. call s:HL('StatusLine', s:gb.bg2, s:gb.fg1, s:inverse)
  485. call s:HL('StatusLineNC', s:gb.bg1, s:gb.fg4, s:inverse)
  486. " The column separating vertically split windows
  487. call s:HL('VertSplit', s:gb.bg3, s:vert_split)
  488. " Current match in wildmenu completion
  489. call s:HL('WildMenu', s:gb.blue, s:gb.bg2, s:bold)
  490. " Directory names, special names in listing
  491. hi! link Directory GruvboxGreenBold
  492. " Titles for output from :set all, :autocmd, etc.
  493. hi! link Title GruvboxGreenBold
  494. " Error messages on the command line
  495. call s:HL('ErrorMsg', s:gb.bg0, s:gb.red, s:bold)
  496. " More prompt: -- More --
  497. hi! link MoreMsg GruvboxYellowBold
  498. " Current mode message: -- INSERT --
  499. hi! link ModeMsg GruvboxYellowBold
  500. " 'Press enter' prompt and yes/no questions
  501. hi! link Question GruvboxOrangeBold
  502. " Warning messages
  503. hi! link WarningMsg GruvboxRedBold
  504. " }}}
  505. " Gutter: {{{
  506. " Line number for :number and :# commands
  507. call s:HL('LineNr', s:gb.bg4, s:number_column)
  508. " Column where signs are displayed
  509. call s:HL('SignColumn', s:none, s:sign_column)
  510. " Line used for closed folds
  511. call s:HL('Folded', s:gb.gray, s:gb.bg1, s:italic)
  512. " Column where folds are displayed
  513. call s:HL('FoldColumn', s:gb.gray, s:gb.bg1)
  514. " }}}
  515. " Cursor: {{{
  516. " Character under cursor
  517. call s:HL('Cursor', s:none, s:none, s:inverse)
  518. " Visual mode cursor, selection
  519. hi! link vCursor Cursor
  520. " Input moder cursor
  521. hi! link iCursor Cursor
  522. " Language mapping cursor
  523. hi! link lCursor Cursor
  524. " }}}
  525. " Syntax Highlighting: {{{
  526. if g:gruvbox_improved_strings == 0
  527. hi! link Special GruvboxOrange
  528. else
  529. call s:HL('Special', s:gb.orange, s:gb.bg1, s:italicize_strings)
  530. endif
  531. call s:HL('Comment', s:gb.gray, s:none, s:italicize_comments)
  532. call s:HL('Todo', s:vim_fg, s:vim_bg, s:bold . s:italic)
  533. call s:HL('Error', s:gb.red, s:vim_bg, s:bold . s:inverse)
  534. " Generic statement
  535. hi! link Statement GruvboxRed
  536. " if, then, else, endif, swicth, etc.
  537. hi! link Conditional GruvboxRed
  538. " for, do, while, etc.
  539. hi! link Repeat GruvboxRed
  540. " case, default, etc.
  541. hi! link Label GruvboxRed
  542. " try, catch, throw
  543. hi! link Exception GruvboxRed
  544. " sizeof, "+", "*", etc.
  545. hi! link Operator GruvboxFg1
  546. " Any other keyword
  547. hi! link Keyword GruvboxRed
  548. " Variable name
  549. hi! link Identifier GruvboxBlue
  550. " Function name
  551. hi! link Function GruvboxGreenBold
  552. " Generic preprocessor
  553. hi! link PreProc GruvboxAqua
  554. " Preprocessor #include
  555. hi! link Include GruvboxAqua
  556. " Preprocessor #define
  557. hi! link Define GruvboxAqua
  558. " Same as Define
  559. hi! link Macro GruvboxAqua
  560. " Preprocessor #if, #else, #endif, etc.
  561. hi! link PreCondit GruvboxAqua
  562. " Generic constant
  563. hi! link Constant GruvboxPurple
  564. " Character constant: 'c', '/n'
  565. hi! link Character GruvboxPurple
  566. " String constant: "this is a string"
  567. if g:gruvbox_improved_strings == 0
  568. call s:HL('String', s:gb.green, s:none, s:italicize_strings)
  569. else
  570. call s:HL('String', s:gb.fg1, s:gb.bg1, s:italicize_strings)
  571. endif
  572. " Boolean constant: TRUE, false
  573. hi! link Boolean GruvboxPurple
  574. " Number constant: 234, 0xff
  575. hi! link Number GruvboxPurple
  576. " Floating point constant: 2.3e10
  577. hi! link Float GruvboxPurple
  578. " Generic type
  579. hi! link Type GruvboxYellow
  580. " static, register, volatile, etc
  581. hi! link StorageClass GruvboxOrange
  582. " struct, union, enum, etc.
  583. hi! link Structure GruvboxAqua
  584. " typedef
  585. hi! link Typedef GruvboxYellow
  586. " }}}
  587. " Completion Menu: {{{
  588. if version >= 700
  589. " Popup menu: normal item
  590. call s:HL('Pmenu', s:gb.fg1, s:gb.bg2)
  591. " Popup menu: selected item
  592. call s:HL('PmenuSel', s:gb.bg2, s:gb.blue, s:bold)
  593. " Popup menu: scrollbar
  594. call s:HL('PmenuSbar', s:none, s:gb.bg2)
  595. " Popup menu: scrollbar thumb
  596. call s:HL('PmenuThumb', s:none, s:gb.bg4)
  597. endif
  598. " }}}
  599. " Diffs: {{{
  600. call s:HL('DiffDelete', s:gb.red, s:gb.bg0, s:inverse)
  601. call s:HL('DiffAdd', s:gb.green, s:gb.bg0, s:inverse)
  602. "call s:HL('DiffChange', s:gb.bg0, s:gb.blue)
  603. "call s:HL('DiffText', s:gb.bg0, s:gb.yellow)
  604. " Alternative setting
  605. call s:HL('DiffChange', s:gb.aqua, s:gb.bg0, s:inverse)
  606. call s:HL('DiffText', s:gb.yellow, s:gb.bg0, s:inverse)
  607. " }}}
  608. " Spelling: {{{
  609. if has("spell")
  610. " Not capitalised word, or compile warnings
  611. if g:gruvbox_improved_warnings == 0
  612. call s:HL('SpellCap', s:none, s:none, s:undercurl, s:gb.blue)
  613. else
  614. call s:HL('SpellCap', s:gb.green, s:none, s:bold . s:italic)
  615. endif
  616. " Not recognized word
  617. call s:HL('SpellBad', s:none, s:none, s:undercurl, s:gb.red)
  618. " Wrong spelling for selected region
  619. call s:HL('SpellLocal', s:none, s:none, s:undercurl, s:gb.aqua)
  620. " Rare word
  621. call s:HL('SpellRare', s:none, s:none, s:undercurl, s:gb.purple)
  622. endif
  623. " }}}
  624. " Plugin specific -------------------------------------------------------------
  625. " EasyMotion: {{{
  626. hi! link EasyMotionTarget GruvboxYellowBold
  627. hi! link EasyMotionShade Comment
  628. " }}}
  629. " Sneak: {{{
  630. hi! link Sneak Search
  631. hi! link SneakLabel Search
  632. " }}}
  633. " Indent Guides: {{{
  634. if !exists('g:indent_guides_auto_colors')
  635. let g:indent_guides_auto_colors = 0
  636. endif
  637. if g:indent_guides_auto_colors == 0
  638. if g:gruvbox_invert_indent_guides == 0
  639. call s:HL('IndentGuidesOdd', s:vim_bg, s:gb.bg2)
  640. call s:HL('IndentGuidesEven', s:vim_bg, s:gb.bg1)
  641. else
  642. call s:HL('IndentGuidesOdd', s:vim_bg, s:gb.bg2, s:inverse)
  643. call s:HL('IndentGuidesEven', s:vim_bg, s:gb.bg3, s:inverse)
  644. endif
  645. endif
  646. " }}}
  647. " IndentLine: {{{
  648. if !exists('g:indentLine_color_term')
  649. let g:indentLine_color_term = s:gb.bg2[1]
  650. endif
  651. if !exists('g:indentLine_color_gui')
  652. let g:indentLine_color_gui = s:gb.bg2[0]
  653. endif
  654. " }}}
  655. " Rainbow Parentheses: {{{
  656. if !exists('g:rbpt_colorpairs')
  657. let g:rbpt_colorpairs =
  658. \ [
  659. \ ['blue', '#458588'], ['magenta', '#b16286'],
  660. \ ['red', '#cc241d'], ['166', '#d65d0e']
  661. \ ]
  662. endif
  663. let g:rainbow_guifgs = [ '#d65d0e', '#cc241d', '#b16286', '#458588' ]
  664. let g:rainbow_ctermfgs = [ '166', 'red', 'magenta', 'blue' ]
  665. if !exists('g:rainbow_conf')
  666. let g:rainbow_conf = {}
  667. endif
  668. if !has_key(g:rainbow_conf, 'guifgs')
  669. let g:rainbow_conf['guifgs'] = g:rainbow_guifgs
  670. endif
  671. if !has_key(g:rainbow_conf, 'ctermfgs')
  672. let g:rainbow_conf['ctermfgs'] = g:rainbow_ctermfgs
  673. endif
  674. let g:niji_dark_colours = g:rbpt_colorpairs
  675. let g:niji_light_colours = g:rbpt_colorpairs
  676. "}}}
  677. " GitGutter: {{{
  678. hi! link GitGutterAdd GruvboxGreenSign
  679. hi! link GitGutterChange GruvboxAquaSign
  680. hi! link GitGutterDelete GruvboxRedSign
  681. hi! link GitGutterChangeDelete GruvboxAquaSign
  682. " }}}
  683. " GitCommit: "{{{
  684. hi! link gitcommitSelectedFile GruvboxGreen
  685. hi! link gitcommitDiscardedFile GruvboxRed
  686. " }}}
  687. " Signify: {{{
  688. hi! link SignifySignAdd GruvboxGreenSign
  689. hi! link SignifySignChange GruvboxAquaSign
  690. hi! link SignifySignDelete GruvboxRedSign
  691. " }}}
  692. " Syntastic: {{{
  693. call s:HL('SyntasticError', s:none, s:none, s:undercurl, s:gb.red)
  694. call s:HL('SyntasticWarning', s:none, s:none, s:undercurl, s:gb.yellow)
  695. hi! link SyntasticErrorSign GruvboxRedSign
  696. hi! link SyntasticWarningSign GruvboxYellowSign
  697. " }}}
  698. " Signature: {{{
  699. hi! link SignatureMarkText GruvboxBlueSign
  700. hi! link SignatureMarkerText GruvboxPurpleSign
  701. " }}}
  702. " ShowMarks: {{{
  703. hi! link ShowMarksHLl GruvboxBlueSign
  704. hi! link ShowMarksHLu GruvboxBlueSign
  705. hi! link ShowMarksHLo GruvboxBlueSign
  706. hi! link ShowMarksHLm GruvboxBlueSign
  707. " }}}
  708. " CtrlP: {{{
  709. hi! link CtrlPMatch GruvboxYellow
  710. hi! link CtrlPNoEntries GruvboxRed
  711. hi! link CtrlPPrtBase GruvboxBg2
  712. hi! link CtrlPPrtCursor GruvboxBlue
  713. hi! link CtrlPLinePre GruvboxBg2
  714. call s:HL('CtrlPMode1', s:gb.blue, s:gb.bg2, s:bold)
  715. call s:HL('CtrlPMode2', s:gb.bg0, s:gb.blue, s:bold)
  716. call s:HL('CtrlPStats', s:gb.fg4, s:gb.bg2, s:bold)
  717. " }}}
  718. " FZF: {{{
  719. let g:fzf_colors = {
  720. \ 'fg': ['fg', 'GruvboxFg1'],
  721. \ 'bg': ['fg', 'GruvboxBg0'],
  722. \ 'hl': ['fg', 'GruvboxYellow'],
  723. \ 'fg+': ['fg', 'GruvboxFg1'],
  724. \ 'bg+': ['fg', 'GruvboxBg1'],
  725. \ 'hl+': ['fg', 'GruvboxYellow'],
  726. \ 'info': ['fg', 'GruvboxBlue'],
  727. \ 'prompt': ['fg', 'GruvboxFg4'],
  728. \ 'pointer': ['fg', 'GruvboxBlue'],
  729. \ 'marker': ['fg', 'GruvboxOrange'],
  730. \ 'spinner': ['fg', 'GruvboxYellow'],
  731. \ 'header': ['fg', 'GruvboxBg3']
  732. \ }
  733. call s:HL('Fzf1', s:gb.blue, s:gb.bg1)
  734. call s:HL('Fzf2', s:gb.orange, s:gb.bg1)
  735. call s:HL('Fzf3', s:gb.fg4, s:gb.bg1)
  736. " }}}
  737. " Startify: {{{
  738. hi! link StartifyBracket GruvboxFg3
  739. hi! link StartifyFile GruvboxFg1
  740. hi! link StartifyNumber GruvboxBlue
  741. hi! link StartifyPath GruvboxGray
  742. hi! link StartifySlash GruvboxGray
  743. hi! link StartifySection GruvboxYellow
  744. hi! link StartifySpecial GruvboxBg2
  745. hi! link StartifyHeader GruvboxOrange
  746. hi! link StartifyFooter GruvboxBg2
  747. " }}}
  748. " Vimshell: {{{
  749. let g:vimshell_escape_colors = [
  750. \ s:gb.bg4[0], s:gb.red[0], s:gb.green[0], s:gb.yellow[0],
  751. \ s:gb.blue[0], s:gb.purple[0], s:gb.aqua[0], s:gb.fg4[0],
  752. \ s:gb.bg0[0], s:gb.red[0], s:gb.green[0], s:gb.orange[0],
  753. \ s:gb.blue[0], s:gb.purple[0], s:gb.aqua[0], s:gb.fg0[0]
  754. \ ]
  755. " }}}
  756. " BufTabLine: {{{
  757. call s:HL('BufTabLineCurrent', s:gb.bg0, s:gb.fg4)
  758. call s:HL('BufTabLineActive', s:gb.fg4, s:gb.bg2)
  759. call s:HL('BufTabLineHidden', s:gb.bg4, s:gb.bg1)
  760. call s:HL('BufTabLineFill', s:gb.bg0, s:gb.bg0)
  761. " }}}
  762. " Asynchronous Lint Engine: {{{
  763. call s:HL('ALEError', s:none, s:none, s:undercurl, s:gb.red)
  764. call s:HL('ALEWarning', s:none, s:none, s:undercurl, s:gb.yellow)
  765. call s:HL('ALEInfo', s:none, s:none, s:undercurl, s:gb.blue)
  766. hi! link ALEErrorSign GruvboxRedSign
  767. hi! link ALEWarningSign GruvboxYellowSign
  768. hi! link ALEInfoSign GruvboxBlueSign
  769. hi! link ALEVirtualTextError GruvboxRed
  770. hi! link ALEVirtualTextWarning GruvboxYellow
  771. hi! link ALEVirtualTextInfo GruvboxBlue
  772. " }}}
  773. " Dirvish: {{{
  774. hi! link DirvishPathTail GruvboxAqua
  775. hi! link DirvishArg GruvboxYellow
  776. " }}}
  777. " Netrw: {{{
  778. hi! link netrwDir GruvboxAqua
  779. hi! link netrwClassify GruvboxAqua
  780. hi! link netrwLink GruvboxGray
  781. hi! link netrwSymLink GruvboxFg1
  782. hi! link netrwExe GruvboxYellow
  783. hi! link netrwComment GruvboxGray
  784. hi! link netrwList GruvboxBlue
  785. hi! link netrwHelpCmd GruvboxAqua
  786. hi! link netrwCmdSep GruvboxFg3
  787. hi! link netrwVersion GruvboxGreen
  788. " }}}
  789. " NERDTree: {{{
  790. hi! link NERDTreeDir GruvboxAqua
  791. hi! link NERDTreeDirSlash GruvboxAqua
  792. hi! link NERDTreeOpenable GruvboxOrange
  793. hi! link NERDTreeClosable GruvboxOrange
  794. hi! link NERDTreeFile GruvboxFg1
  795. hi! link NERDTreeExecFile GruvboxYellow
  796. hi! link NERDTreeUp GruvboxGray
  797. hi! link NERDTreeCWD GruvboxGreen
  798. hi! link NERDTreeHelp GruvboxFg1
  799. hi! link NERDTreeToggleOn GruvboxGreen
  800. hi! link NERDTreeToggleOff GruvboxRed
  801. " }}}
  802. " Vim Multiple Cursors: {{{
  803. call s:HL('multiple_cursors_cursor', s:none, s:none, s:inverse)
  804. call s:HL('multiple_cursors_visual', s:none, s:gb.bg2)
  805. " }}}
  806. " coc.nvim: {{{
  807. hi! link CocErrorSign GruvboxRedSign
  808. hi! link CocWarningSign GruvboxOrangeSign
  809. hi! link CocInfoSign GruvboxYellowSign
  810. hi! link CocHintSign GruvboxBlueSign
  811. hi! link CocErrorFloat GruvboxRed
  812. hi! link CocWarningFloat GruvboxOrange
  813. hi! link CocInfoFloat GruvboxYellow
  814. hi! link CocHintFloat GruvboxBlue
  815. hi! link CocDiagnosticsError GruvboxRed
  816. hi! link CocDiagnosticsWarning GruvboxOrange
  817. hi! link CocDiagnosticsInfo GruvboxYellow
  818. hi! link CocDiagnosticsHint GruvboxBlue
  819. hi! link CocSelectedText GruvboxRed
  820. hi! link CocCodeLens GruvboxGray
  821. call s:HL('CocErrorHighlight', s:none, s:none, s:undercurl, s:red)
  822. call s:HL('CocWarningHighlight', s:none, s:none, s:undercurl, s:orange)
  823. call s:HL('CocInfoHighlight', s:none, s:none, s:undercurl, s:yellow)
  824. call s:HL('CocHintHighlight', s:none, s:none, s:undercurl, s:blue)
  825. " }}}
  826. " Filetype specific -----------------------------------------------------------
  827. " Diff: {{{
  828. hi! link diffAdded GruvboxGreen
  829. hi! link diffRemoved GruvboxRed
  830. hi! link diffChanged GruvboxAqua
  831. hi! link diffFile GruvboxOrange
  832. hi! link diffNewFile GruvboxYellow
  833. hi! link diffLine GruvboxBlue
  834. " }}}
  835. " Html: {{{
  836. hi! link htmlTag GruvboxAquaBold
  837. hi! link htmlEndTag GruvboxAquaBold
  838. hi! link htmlTagName GruvboxBlue
  839. hi! link htmlArg GruvboxOrange
  840. hi! link htmlScriptTag GruvboxPurple
  841. hi! link htmlTagN GruvboxFg1
  842. hi! link htmlSpecialTagName GruvboxBlue
  843. call s:HL('htmlLink', s:gb.fg4, s:none, s:underline)
  844. hi! link htmlSpecialChar GruvboxRed
  845. call s:HL('htmlBold', s:vim_fg, s:vim_bg, s:bold)
  846. call s:HL('htmlBoldUnderline', s:vim_fg, s:vim_bg, s:bold . s:underline)
  847. call s:HL('htmlBoldItalic', s:vim_fg, s:vim_bg, s:bold . s:italic)
  848. call s:HL('htmlBoldUnderlineItalic', s:vim_fg, s:vim_bg, s:bold . s:underline . s:italic)
  849. call s:HL('htmlUnderline', s:vim_fg, s:vim_bg, s:underline)
  850. call s:HL('htmlUnderlineItalic', s:vim_fg, s:vim_bg, s:underline . s:italic)
  851. call s:HL('htmlItalic', s:vim_fg, s:vim_bg, s:italic)
  852. " }}}
  853. " Xml: {{{
  854. hi! link xmlTag GruvboxAquaBold
  855. hi! link xmlEndTag GruvboxAquaBold
  856. hi! link xmlTagName GruvboxAquaBold
  857. hi! link xmlEqual GruvboxBlue
  858. hi! link docbkKeyword GruvboxAquaBold
  859. hi! link xmlDocTypeDecl GruvboxGray
  860. hi! link xmlDocTypeKeyword GruvboxPurple
  861. hi! link xmlCdataStart GruvboxGray
  862. hi! link xmlCdataCdata GruvboxPurple
  863. hi! link dtdFunction GruvboxGray
  864. hi! link dtdTagName GruvboxPurple
  865. hi! link xmlAttrib GruvboxOrange
  866. hi! link xmlProcessingDelim GruvboxGray
  867. hi! link dtdParamEntityPunct GruvboxGray
  868. hi! link dtdParamEntityDPunct GruvboxGray
  869. hi! link xmlAttribPunct GruvboxGray
  870. hi! link xmlEntity GruvboxRed
  871. hi! link xmlEntityPunct GruvboxRed
  872. " }}}
  873. " Vim: {{{
  874. call s:HL('vimCommentTitle', s:gb.fg4_256, s:none, s:bold . s:italicize_comments)
  875. hi! link vimNotation GruvboxOrange
  876. hi! link vimBracket GruvboxOrange
  877. hi! link vimMapModKey GruvboxOrange
  878. hi! link vimFuncSID GruvboxFg3
  879. hi! link vimSetSep GruvboxFg3
  880. hi! link vimSep GruvboxFg3
  881. hi! link vimContinue GruvboxFg3
  882. " }}}
  883. " Clojure: {{{
  884. hi! link clojureKeyword GruvboxBlue
  885. hi! link clojureCond GruvboxOrange
  886. hi! link clojureSpecial GruvboxOrange
  887. hi! link clojureDefine GruvboxOrange
  888. hi! link clojureFunc GruvboxYellow
  889. hi! link clojureRepeat GruvboxYellow
  890. hi! link clojureCharacter GruvboxAqua
  891. hi! link clojureStringEscape GruvboxAqua
  892. hi! link clojureException GruvboxRed
  893. hi! link clojureRegexp GruvboxAqua
  894. hi! link clojureRegexpEscape GruvboxAqua
  895. call s:HL('clojureRegexpCharClass', s:gb.fg3, s:none, s:bold)
  896. hi! link clojureRegexpMod clojureRegexpCharClass
  897. hi! link clojureRegexpQuantifier clojureRegexpCharClass
  898. hi! link clojureParen GruvboxFg3
  899. hi! link clojureAnonArg GruvboxYellow
  900. hi! link clojureVariable GruvboxBlue
  901. hi! link clojureMacro GruvboxOrange
  902. hi! link clojureMeta GruvboxYellow
  903. hi! link clojureDeref GruvboxYellow
  904. hi! link clojureQuote GruvboxYellow
  905. hi! link clojureUnquote GruvboxYellow
  906. " }}}
  907. " C: {{{
  908. hi! link cOperator GruvboxPurple
  909. hi! link cppOperator GruvboxPurple
  910. hi! link cStructure GruvboxOrange
  911. " }}}
  912. " Python: {{{
  913. hi! link pythonBuiltin GruvboxOrange
  914. hi! link pythonBuiltinObj GruvboxOrange
  915. hi! link pythonBuiltinFunc GruvboxOrange
  916. hi! link pythonFunction GruvboxAqua
  917. hi! link pythonDecorator GruvboxRed
  918. hi! link pythonInclude GruvboxBlue
  919. hi! link pythonImport GruvboxBlue
  920. hi! link pythonRun GruvboxBlue
  921. hi! link pythonCoding GruvboxBlue
  922. hi! link pythonOperator GruvboxRed
  923. hi! link pythonException GruvboxRed
  924. hi! link pythonExceptions GruvboxPurple
  925. hi! link pythonBoolean GruvboxPurple
  926. hi! link pythonDot GruvboxFg3
  927. hi! link pythonConditional GruvboxRed
  928. hi! link pythonRepeat GruvboxRed
  929. hi! link pythonDottedName GruvboxGreenBold
  930. " }}}
  931. " CSS: {{{
  932. hi! link cssBraces GruvboxBlue
  933. hi! link cssFunctionName GruvboxYellow
  934. hi! link cssIdentifier GruvboxOrange
  935. hi! link cssClassName GruvboxGreen
  936. hi! link cssColor GruvboxBlue
  937. hi! link cssSelectorOp GruvboxBlue
  938. hi! link cssSelectorOp2 GruvboxBlue
  939. hi! link cssImportant GruvboxGreen
  940. hi! link cssVendor GruvboxFg1
  941. hi! link cssTextProp GruvboxAqua
  942. hi! link cssAnimationProp GruvboxAqua
  943. hi! link cssUIProp GruvboxYellow
  944. hi! link cssTransformProp GruvboxAqua
  945. hi! link cssTransitionProp GruvboxAqua
  946. hi! link cssPrintProp GruvboxAqua
  947. hi! link cssPositioningProp GruvboxYellow
  948. hi! link cssBoxProp GruvboxAqua
  949. hi! link cssFontDescriptorProp GruvboxAqua
  950. hi! link cssFlexibleBoxProp GruvboxAqua
  951. hi! link cssBorderOutlineProp GruvboxAqua
  952. hi! link cssBackgroundProp GruvboxAqua
  953. hi! link cssMarginProp GruvboxAqua
  954. hi! link cssListProp GruvboxAqua
  955. hi! link cssTableProp GruvboxAqua
  956. hi! link cssFontProp GruvboxAqua
  957. hi! link cssPaddingProp GruvboxAqua
  958. hi! link cssDimensionProp GruvboxAqua
  959. hi! link cssRenderProp GruvboxAqua
  960. hi! link cssColorProp GruvboxAqua
  961. hi! link cssGeneratedContentProp GruvboxAqua
  962. " }}}
  963. " JavaScript: {{{
  964. hi! link javaScriptBraces GruvboxFg1
  965. hi! link javaScriptFunction GruvboxAqua
  966. hi! link javaScriptIdentifier GruvboxRed
  967. hi! link javaScriptMember GruvboxBlue
  968. hi! link javaScriptNumber GruvboxPurple
  969. hi! link javaScriptNull GruvboxPurple
  970. hi! link javaScriptParens GruvboxFg3
  971. " }}}
  972. " YAJS: {{{
  973. hi! link javascriptImport GruvboxAqua
  974. hi! link javascriptExport GruvboxAqua
  975. hi! link javascriptClassKeyword GruvboxAqua
  976. hi! link javascriptClassExtends GruvboxAqua
  977. hi! link javascriptDefault GruvboxAqua
  978. hi! link javascriptClassName GruvboxYellow
  979. hi! link javascriptClassSuperName GruvboxYellow
  980. hi! link javascriptGlobal GruvboxYellow
  981. hi! link javascriptEndColons GruvboxFg1
  982. hi! link javascriptFuncArg GruvboxFg1
  983. hi! link javascriptGlobalMethod GruvboxFg1
  984. hi! link javascriptNodeGlobal GruvboxFg1
  985. hi! link javascriptBOMWindowProp GruvboxFg1
  986. hi! link javascriptArrayMethod GruvboxFg1
  987. hi! link javascriptArrayStaticMethod GruvboxFg1
  988. hi! link javascriptCacheMethod GruvboxFg1
  989. hi! link javascriptDateMethod GruvboxFg1
  990. hi! link javascriptMathStaticMethod GruvboxFg1
  991. " hi! link javascriptProp GruvboxFg1
  992. hi! link javascriptURLUtilsProp GruvboxFg1
  993. hi! link javascriptBOMNavigatorProp GruvboxFg1
  994. hi! link javascriptDOMDocMethod GruvboxFg1
  995. hi! link javascriptDOMDocProp GruvboxFg1
  996. hi! link javascriptBOMLocationMethod GruvboxFg1
  997. hi! link javascriptBOMWindowMethod GruvboxFg1
  998. hi! link javascriptStringMethod GruvboxFg1
  999. hi! link javascriptVariable GruvboxOrange
  1000. " hi! link javascriptVariable GruvboxRed
  1001. " hi! link javascriptIdentifier GruvboxOrange
  1002. " hi! link javascriptClassSuper GruvboxOrange
  1003. hi! link javascriptIdentifier GruvboxOrange
  1004. hi! link javascriptClassSuper GruvboxOrange
  1005. " hi! link javascriptFuncKeyword GruvboxOrange
  1006. " hi! link javascriptAsyncFunc GruvboxOrange
  1007. hi! link javascriptFuncKeyword GruvboxAqua
  1008. hi! link javascriptAsyncFunc GruvboxAqua
  1009. hi! link javascriptClassStatic GruvboxOrange
  1010. hi! link javascriptOperator GruvboxRed
  1011. hi! link javascriptForOperator GruvboxRed
  1012. hi! link javascriptYield GruvboxRed
  1013. hi! link javascriptExceptions GruvboxRed
  1014. hi! link javascriptMessage GruvboxRed
  1015. hi! link javascriptTemplateSB GruvboxAqua
  1016. hi! link javascriptTemplateSubstitution GruvboxFg1
  1017. " hi! link javascriptLabel GruvboxBlue
  1018. " hi! link javascriptObjectLabel GruvboxBlue
  1019. " hi! link javascriptPropertyName GruvboxBlue
  1020. hi! link javascriptLabel GruvboxFg1
  1021. hi! link javascriptObjectLabel GruvboxFg1
  1022. hi! link javascriptPropertyName GruvboxFg1
  1023. hi! link javascriptLogicSymbols GruvboxFg1
  1024. hi! link javascriptArrowFunc GruvboxYellow
  1025. hi! link javascriptDocParamName GruvboxFg4
  1026. hi! link javascriptDocTags GruvboxFg4
  1027. hi! link javascriptDocNotation GruvboxFg4
  1028. hi! link javascriptDocParamType GruvboxFg4
  1029. hi! link javascriptDocNamedParamType GruvboxFg4
  1030. hi! link javascriptBrackets GruvboxFg1
  1031. hi! link javascriptDOMElemAttrs GruvboxFg1
  1032. hi! link javascriptDOMEventMethod GruvboxFg1
  1033. hi! link javascriptDOMNodeMethod GruvboxFg1
  1034. hi! link javascriptDOMStorageMethod GruvboxFg1
  1035. hi! link javascriptHeadersMethod GruvboxFg1
  1036. hi! link javascriptAsyncFuncKeyword GruvboxRed
  1037. hi! link javascriptAwaitFuncKeyword GruvboxRed
  1038. " }}}
  1039. " PanglossJS: {{{
  1040. hi! link jsClassKeyword GruvboxAqua
  1041. hi! link jsExtendsKeyword GruvboxAqua
  1042. hi! link jsExportDefault GruvboxAqua
  1043. hi! link jsTemplateBraces GruvboxAqua
  1044. hi! link jsGlobalNodeObjects GruvboxBlue
  1045. hi! link jsGlobalObjects GruvboxBlue
  1046. hi! link jsObjectKey GruvboxGreenBold
  1047. hi! link jsFunction GruvboxAqua
  1048. hi! link jsFuncCall GruvboxBlue
  1049. hi! link jsFuncParens GruvboxFg3
  1050. hi! link jsParens GruvboxFg3
  1051. hi! link jsNull GruvboxPurple
  1052. hi! link jsUndefined GruvboxPurple
  1053. hi! link jsClassDefinition GruvboxYellow
  1054. hi! link jsOperatorKeyword GruvboxRed
  1055. " }}}
  1056. " TypeScript: {{{
  1057. hi! link typescriptReserved GruvboxAqua
  1058. hi! link typescriptLabel GruvboxAqua
  1059. hi! link typescriptFuncKeyword GruvboxAqua
  1060. hi! link typescriptIdentifier GruvboxOrange
  1061. hi! link typescriptBraces GruvboxFg1
  1062. hi! link typescriptEndColons GruvboxFg1
  1063. hi! link typescriptDOMObjects GruvboxFg1
  1064. hi! link typescriptAjaxMethods GruvboxFg1
  1065. hi! link typescriptLogicSymbols GruvboxFg1
  1066. hi! link typescriptDocSeeTag Comment
  1067. hi! link typescriptDocParam Comment
  1068. hi! link typescriptDocTags vimCommentTitle
  1069. hi! link typescriptGlobalObjects GruvboxFg1
  1070. hi! link typescriptParens GruvboxFg3
  1071. hi! link typescriptOpSymbols GruvboxFg3
  1072. hi! link typescriptHtmlElemProperties GruvboxFg1
  1073. hi! link typescriptNull GruvboxPurple
  1074. hi! link typescriptInterpolationDelimiter GruvboxAqua
  1075. " }}}
  1076. " JSX: maxmellon/vim-jsx-pretty: {{{
  1077. hi! link jsxTagName GruvboxAqua
  1078. hi! link jsxComponentName GruvboxGreen
  1079. hi! link jsxCloseString GruvboxFg4
  1080. hi! link jsxAttrib GruvboxYellow
  1081. hi! link jsxEqual GruvboxAqua
  1082. "}}}
  1083. " PureScript: {{{
  1084. hi! link purescriptModuleKeyword GruvboxAqua
  1085. hi! link purescriptModuleName GruvboxFg1
  1086. hi! link purescriptWhere GruvboxAqua
  1087. hi! link purescriptDelimiter GruvboxFg4
  1088. hi! link purescriptType GruvboxFg1
  1089. hi! link purescriptImportKeyword GruvboxAqua
  1090. hi! link purescriptHidingKeyword GruvboxAqua
  1091. hi! link purescriptAsKeyword GruvboxAqua
  1092. hi! link purescriptStructure GruvboxAqua
  1093. hi! link purescriptOperator GruvboxBlue
  1094. hi! link purescriptTypeVar GruvboxFg1
  1095. hi! link purescriptConstructor GruvboxFg1
  1096. hi! link purescriptFunction GruvboxFg1
  1097. hi! link purescriptConditional GruvboxOrange
  1098. hi! link purescriptBacktick GruvboxOrange
  1099. " }}}
  1100. " CoffeeScript: {{{
  1101. hi! link coffeeExtendedOp GruvboxFg3
  1102. hi! link coffeeSpecialOp GruvboxFg3
  1103. hi! link coffeeCurly GruvboxOrange
  1104. hi! link coffeeParen GruvboxFg3
  1105. hi! link coffeeBracket GruvboxOrange
  1106. " }}}
  1107. " Ruby: {{{
  1108. hi! link rubyStringDelimiter GruvboxGreen
  1109. hi! link rubyInterpolationDelimiter GruvboxAqua
  1110. " }}}
  1111. " ObjectiveC: {{{
  1112. hi! link objcTypeModifier GruvboxRed
  1113. hi! link objcDirective GruvboxBlue
  1114. " }}}
  1115. " Go: {{{
  1116. hi! link goDirective GruvboxAqua
  1117. hi! link goConstants GruvboxPurple
  1118. hi! link goDeclaration GruvboxRed
  1119. hi! link goDeclType GruvboxBlue
  1120. hi! link goBuiltins GruvboxOrange
  1121. " }}}
  1122. " Lua: {{{
  1123. hi! link luaIn GruvboxRed
  1124. hi! link luaFunction GruvboxAqua
  1125. hi! link luaTable GruvboxOrange
  1126. " }}}
  1127. " MoonScript: {{{
  1128. hi! link moonSpecialOp GruvboxFg3
  1129. hi! link moonExtendedOp GruvboxFg3
  1130. hi! link moonFunction GruvboxFg3
  1131. hi! link moonObject GruvboxYellow
  1132. " }}}
  1133. " Java: {{{
  1134. hi! link javaAnnotation GruvboxBlue
  1135. hi! link javaDocTags GruvboxAqua
  1136. hi! link javaCommentTitle vimCommentTitle
  1137. hi! link javaParen GruvboxFg3
  1138. hi! link javaParen1 GruvboxFg3
  1139. hi! link javaParen2 GruvboxFg3
  1140. hi! link javaParen3 GruvboxFg3
  1141. hi! link javaParen4 GruvboxFg3
  1142. hi! link javaParen5 GruvboxFg3
  1143. hi! link javaOperator GruvboxOrange
  1144. hi! link javaVarArg GruvboxGreen
  1145. " }}}
  1146. " Elixir: {{{
  1147. hi! link elixirDocString Comment
  1148. hi! link elixirStringDelimiter GruvboxGreen
  1149. hi! link elixirInterpolationDelimiter GruvboxAqua
  1150. hi! link elixirModuleDeclaration GruvboxYellow
  1151. " }}}
  1152. " Scala: {{{
  1153. " NB: scala vim syntax file is kinda horrible
  1154. hi! link scalaNameDefinition GruvboxFg1
  1155. hi! link scalaCaseFollowing GruvboxFg1
  1156. hi! link scalaCapitalWord GruvboxFg1
  1157. hi! link scalaTypeExtension GruvboxFg1
  1158. hi! link scalaKeyword GruvboxRed
  1159. hi! link scalaKeywordModifier GruvboxRed
  1160. hi! link scalaSpecial GruvboxAqua
  1161. hi! link scalaOperator GruvboxFg1
  1162. hi! link scalaTypeDeclaration GruvboxYellow
  1163. hi! link scalaTypeTypePostDeclaration GruvboxYellow
  1164. hi! link scalaInstanceDeclaration GruvboxFg1
  1165. hi! link scalaInterpolation GruvboxAqua
  1166. " }}}
  1167. " Markdown: {{{
  1168. call s:HL('markdownItalic', s:gb.fg3, s:none, s:italic)
  1169. hi! link markdownH1 GruvboxGreenBold
  1170. hi! link markdownH2 GruvboxGreenBold
  1171. hi! link markdownH3 GruvboxYellowBold
  1172. hi! link markdownH4 GruvboxYellowBold
  1173. hi! link markdownH5 GruvboxYellow
  1174. hi! link markdownH6 GruvboxYellow
  1175. hi! link markdownCode GruvboxAqua
  1176. hi! link markdownCodeBlock GruvboxAqua
  1177. hi! link markdownCodeDelimiter GruvboxAqua
  1178. hi! link markdownBlockquote GruvboxGray
  1179. hi! link markdownListMarker GruvboxGray
  1180. hi! link markdownOrderedListMarker GruvboxGray
  1181. hi! link markdownRule GruvboxGray
  1182. hi! link markdownHeadingRule GruvboxGray
  1183. hi! link markdownUrlDelimiter GruvboxFg3
  1184. hi! link markdownLinkDelimiter GruvboxFg3
  1185. hi! link markdownLinkTextDelimiter GruvboxFg3
  1186. hi! link markdownHeadingDelimiter GruvboxOrange
  1187. hi! link markdownUrl GruvboxPurple
  1188. hi! link markdownUrlTitleDelimiter GruvboxGreen
  1189. call s:HL('markdownLinkText', s:gray, s:none, s:underline)
  1190. hi! link markdownIdDeclaration markdownLinkText
  1191. " }}}
  1192. " Haskell: {{{
  1193. hi! link haskellType GruvboxBlue
  1194. hi! link haskellIdentifier GruvboxAqua
  1195. hi! link haskellSeparator GruvboxFg4
  1196. hi! link haskellDelimiter GruvboxOrange
  1197. hi! link haskellOperators GruvboxPurple
  1198. hi! link haskellBacktick GruvboxOrange
  1199. hi! link haskellStatement GruvboxPurple
  1200. hi! link haskellConditional GruvboxPurple
  1201. hi! link haskellLet GruvboxRed
  1202. hi! link haskellDefault GruvboxRed
  1203. hi! link haskellWhere GruvboxRed
  1204. hi! link haskellBottom GruvboxRedBold
  1205. hi! link haskellImportKeywords GruvboxPurpleBold
  1206. hi! link haskellDeclKeyword GruvboxOrange
  1207. hi! link haskellDecl GruvboxOrange
  1208. hi! link haskellDeriving GruvboxPurple
  1209. hi! link haskellAssocType GruvboxAqua
  1210. hi! link haskellNumber GruvboxAqua
  1211. hi! link haskellPragma GruvboxRedBold
  1212. hi! link haskellTH GruvboxAquaBold
  1213. hi! link haskellForeignKeywords GruvboxGreen
  1214. hi! link haskellKeyword GruvboxRed
  1215. hi! link haskellFloat GruvboxAqua
  1216. hi! link haskellInfix GruvboxPurple
  1217. hi! link haskellQuote GruvboxGreenBold
  1218. hi! link haskellShebang GruvboxYellowBold
  1219. hi! link haskellLiquid GruvboxPurpleBold
  1220. hi! link haskellQuasiQuoted GruvboxBlueBold
  1221. hi! link haskellRecursiveDo GruvboxPurlpe
  1222. hi! link haskellQuotedType GruvboxRed
  1223. hi! link haskellPreProc GruvboxFg4
  1224. hi! link haskellTypeRoles GruvboxRedBold
  1225. hi! link haskellTypeForall GruvboxRed
  1226. hi! link haskellPatternKeyword GruvboxBlue
  1227. " }}}
  1228. " Json: {{{
  1229. hi! link jsonKeyword GruvboxGreen
  1230. hi! link jsonQuote GruvboxGreen
  1231. hi! link jsonBraces GruvboxFg1
  1232. hi! link jsonString GruvboxFg1
  1233. " }}}
  1234. " Mail: {{{
  1235. " mail header
  1236. hi! link mailHeader GruvBoxBlue
  1237. hi! link mailHeaderKey GruvBoxBlue
  1238. hi! link mailHeaderEmail GruvBoxBlue
  1239. hi! link mailSubject GruvboxBlue
  1240. " mail quoted text
  1241. hi! link mailQuoted1 GruvBoxAqua
  1242. hi! link mailQuoted2 GruvBoxPurple
  1243. hi! link mailQuoted3 GruvBoxYellow
  1244. hi! link mailQuoted4 GruvBoxGreen
  1245. hi! link mailQuoted5 GruvBoxRed
  1246. hi! link mailQuoted6 GruvBoxOrange
  1247. hi! link mailQuotedExp1 GruvBoxAqua
  1248. hi! link mailQuotedExp2 GruvBoxPurple
  1249. hi! link mailQuotedExp3 GruvBoxYellow
  1250. hi! link mailQuotedExp4 GruvBoxGreen
  1251. hi! link mailQuotedExp5 GruvBoxRed
  1252. hi! link mailQuotedExp6 GruvBoxOrange
  1253. " I did not discover yet for what this is used
  1254. " hi! link mailVerbatim GruvBoxRed
  1255. " mail signature
  1256. hi! link mailSignature GruvBoxFg
  1257. " mail url and emails
  1258. hi! link mailURL GruvBoxOrange
  1259. hi! link mailEmail GruvBoxOrange
  1260. " }}}
  1261. " C#: {{{
  1262. hi! link csBraces GruvboxFg1
  1263. hi! link csEndColon GruvboxFg1
  1264. hi! link csLogicSymbols GruvboxFg1
  1265. hi! link csParens GruvboxFg3
  1266. hi! link csOpSymbols GruvboxFg3
  1267. hi! link csInterpolationDelimiter GruvboxFg3
  1268. hi! link csInterpolationAlignDel GruvboxAquaBold
  1269. hi! link csInterpolationFormat GruvboxAqua
  1270. hi! link csInterpolationFormatDel GruvboxAquaBold
  1271. " }}}
  1272. " Rust: {{{
  1273. hi! link rustSigil GruvboxOrange
  1274. hi! link rustEscape GruvboxAqua
  1275. hi! link rustStringContinuation GruvboxAqua
  1276. hi! link rustEnum GruvboxAqua
  1277. hi! link rustStructure GruvboxAqua
  1278. hi! link rustModPathSep GruvboxFg2
  1279. hi! link rustCommentLineDoc Comment
  1280. hi! link rustDefault GruvboxAqua
  1281. " }}}
  1282. " Functions -------------------------------------------------------------------
  1283. " Search Highlighting Cursor {{{
  1284. function! GruvboxHlsShowCursor()
  1285. call s:HL('Cursor', s:bg0, s:hls_cursor)
  1286. endfunction
  1287. function! GruvboxHlsHideCursor()
  1288. call s:HL('Cursor', s:none, s:none, s:inverse)
  1289. endfunction
  1290. " }}}
  1291. " vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker: