material.vim 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  1. " Vim Color File
  2. " Name: material.vim
  3. " Maintainer: https://github.com/kaicataldo/material.vim
  4. " License: The MIT License (MIT)
  5. " === Configuration ===
  6. " Clear any other set colors
  7. highlight clear
  8. if exists('syntax_on')
  9. syntax reset
  10. endif
  11. let g:colors_name = 'material'
  12. let g:material_theme_style = get(g:, 'material_theme_style', 'default')
  13. let g:material_terminal_italics = get(g:, 'material_terminal_italics', 0)
  14. " For backwards compatibility
  15. if (g:material_theme_style == 'dark')
  16. let g:material_theme_style = 'darker'
  17. endif
  18. " === Functions ===
  19. function! s:SetHighlight(group, fg, bg, attr)
  20. let l:attr = a:attr
  21. if !g:material_terminal_italics && l:attr == 'italic'
  22. let l:attr = ''
  23. endif
  24. if empty(l:attr)
  25. let l:attr = 'none'
  26. endif
  27. if !empty(a:fg)
  28. exec 'hi ' . a:group . ' guifg=' . a:fg.gui . ' ctermfg=' . a:fg.cterm
  29. endif
  30. if !empty(a:bg)
  31. exec 'hi ' . a:group . ' guibg=' . a:bg.gui . ' ctermbg=' . a:bg.cterm
  32. endif
  33. if !empty(l:attr)
  34. exec 'hi ' . a:group . ' gui=' . l:attr . ' cterm=' . l:attr
  35. endif
  36. endfun
  37. " === Color Definitions ===
  38. " Default colors
  39. set background=dark
  40. let s:bg = { 'gui': '#263238', 'cterm': 'none' }
  41. let s:fg = { 'gui': '#eeffff', 'cterm': 231 }
  42. let s:invisibles = { 'gui': '#65738e', 'cterm': 66 }
  43. let s:comments = { 'gui': '#546e7a', 'cterm': 145 }
  44. let s:caret = { 'gui': '#ffcc00', 'cterm': 220 }
  45. let s:selection = { 'gui': '#2c3b41', 'cterm': 239 }
  46. let s:guides = { 'gui': '#37474f', 'cterm': 17 }
  47. let s:line_numbers = { 'gui': '#37474f', 'cterm': 145 }
  48. let s:line_highlight = { 'gui': '#1a2327', 'cterm': 235 }
  49. let s:white = { 'gui': '#ffffff', 'cterm': 231 }
  50. let s:black = { 'gui': '#000000', 'cterm': 232 }
  51. let s:red = { 'gui': '#ff5370', 'cterm': 203 }
  52. let s:orange = { 'gui': '#f78c6c', 'cterm': 209 }
  53. let s:yellow = { 'gui': '#ffcb6b', 'cterm': 11 }
  54. let s:green = { 'gui': '#c3e88d', 'cterm': 2 } " 186 –– almost perfect match
  55. let s:cyan = { 'gui': '#89ddff', 'cterm': 117 }
  56. let s:blue = { 'gui': '#82aaff', 'cterm': 111 }
  57. let s:paleblue = { 'gui': '#b2ccd6', 'cterm': 152 }
  58. let s:purple = { 'gui': '#c792ea', 'cterm': 176 }
  59. let s:brown = { 'gui': '#c17e70', 'cterm': 137 }
  60. let s:pink = { 'gui': '#f07178', 'cterm': 204 }
  61. let s:violet = { 'gui': '#bb80b3', 'cterm': 139 }
  62. " Theme-specific color overrides
  63. if g:material_theme_style == 'palenight' || g:material_theme_style == 'palenight-community'
  64. let s:bg = { 'gui': '#292d3e', 'cterm': 'none' }
  65. let s:fg = { 'gui': '#a6accd', 'cterm': 146 }
  66. let s:invisibles = { 'gui': '#4e5579', 'cterm': 60 }
  67. let s:comments = { 'gui': '#676e95', 'cterm': 60 }
  68. let s:selection = { 'gui': '#343b51', 'cterm': 60 }
  69. let s:guides = { 'gui': '#4e5579', 'cterm': 60 }
  70. let s:line_numbers = { 'gui': '#3a3f58', 'cterm': 60 }
  71. let s:line_highlight = { 'gui': '#1c1f2b', 'cterm': 234 }
  72. elseif g:material_theme_style == 'darker' || g:material_theme_style == 'darker-community'
  73. let s:bg = { 'gui': '#212121', 'cterm': 'none' }
  74. let s:fg = { 'gui': '#eeffff', 'cterm': 231 }
  75. let s:invisibles = { 'gui': '#65737e', 'cterm': 66 }
  76. let s:comments = { 'gui': '#545454', 'cterm': 59 }
  77. let s:selection = { 'gui': '#2c2c2c', 'cterm': 237 }
  78. let s:guides = { 'gui': '#424242', 'cterm': 0 }
  79. let s:line_numbers = { 'gui': '#424242', 'cterm': 0 }
  80. let s:line_highlight = { 'gui': '#171717', 'cterm': 0 }
  81. elseif g:material_theme_style == 'ocean' || g:material_theme_style == 'ocean-community'
  82. let s:bg = { 'gui': '#0f111a', 'cterm': 'none' }
  83. let s:fg = { 'gui': '#8f93a2', 'cterm': 103 }
  84. let s:invisibles = { 'gui': '#80869e', 'cterm': 103 }
  85. let s:comments = { 'gui': '#464b5d', 'cterm': 60 }
  86. let s:selection = { 'gui': '#1f2233', 'cterm': 60 }
  87. let s:guides = { 'gui': '#3b3f51', 'cterm': 17 }
  88. let s:line_numbers = { 'gui': '#3b3f51', 'cterm': 60 }
  89. let s:line_highlight = { 'gui': '#0a0c12', 'cterm': 0 }
  90. elseif g:material_theme_style == 'lighter' || g:material_theme_style == 'lighter-community'
  91. set background=light
  92. let s:bg = { 'gui': '#fafafa', 'cterm': 'none' }
  93. let s:fg = { 'gui': '#90a4ae', 'cterm': 109 }
  94. let s:invisibles = { 'gui': '#e7eaec', 'cterm': 189 }
  95. let s:comments = { 'gui': '#90a4ae', 'cterm': 109 }
  96. let s:caret = { 'gui': '#272727', 'cterm': 0 }
  97. let s:selection = { 'gui': '#ebf4f3', 'cterm': 254 }
  98. let s:guides = { 'gui': '#b0bec5', 'cterm': 146 }
  99. let s:line_numbers = { 'gui': '#cfd8dc', 'cterm': 188 }
  100. let s:line_highlight = { 'gui': '#ecf0f1', 'cterm': 253 }
  101. let s:white = { 'gui': '#ffffff', 'cterm': 231 }
  102. let s:black = { 'gui': '#000000', 'cterm': 0 }
  103. let s:red = { 'gui': '#e53935', 'cterm': 160 }
  104. let s:orange = { 'gui': '#f76d47', 'cterm': 202 }
  105. let s:yellow = { 'gui': '#ffb62c', 'cterm': 214 }
  106. let s:green = { 'gui': '#91b859', 'cterm': 107 }
  107. let s:cyan = { 'gui': '#39adb5', 'cterm': 37 }
  108. let s:blue = { 'gui': '#6182b8', 'cterm': 67 }
  109. let s:paleblue = { 'gui': '#8796b0', 'cterm': 103 }
  110. let s:purple = { 'gui': '#7c4dff', 'cterm': 99 }
  111. let s:brown = { 'gui': '#c17e70', 'cterm': 137 }
  112. let s:pink = { 'gui': '#ff5370', 'cterm': 203 }
  113. let s:violet = { 'gui': '#945eb8', 'cterm': 97 }
  114. endif
  115. " Defined globally so that the Airline theme has access
  116. let g:material_colorscheme_map = {}
  117. let g:material_colorscheme_map.bg = s:bg
  118. let g:material_colorscheme_map.fg = s:fg
  119. let g:material_colorscheme_map.invisibles = s:invisibles
  120. let g:material_colorscheme_map.comments = s:comments
  121. let g:material_colorscheme_map.caret = s:caret
  122. let g:material_colorscheme_map.selection = s:selection
  123. let g:material_colorscheme_map.guides = s:guides
  124. let g:material_colorscheme_map.line_numbers = s:line_numbers
  125. let g:material_colorscheme_map.line_highlight = s:line_highlight
  126. let g:material_colorscheme_map.white = s:white
  127. let g:material_colorscheme_map.black = s:black
  128. let g:material_colorscheme_map.red = s:red
  129. let g:material_colorscheme_map.orange = s:orange
  130. let g:material_colorscheme_map.yellow = s:yellow
  131. let g:material_colorscheme_map.green = s:green
  132. let g:material_colorscheme_map.cyan = s:cyan
  133. let g:material_colorscheme_map.blue = s:blue
  134. let g:material_colorscheme_map.paleblue = s:paleblue
  135. let g:material_colorscheme_map.purple = s:purple
  136. let g:material_colorscheme_map.brown = s:brown
  137. let g:material_colorscheme_map.pink = s:pink
  138. let g:material_colorscheme_map.violet = s:violet
  139. " === Highlights ===
  140. " Vim Editor
  141. call s:SetHighlight('ColorColumn', '', s:invisibles, '')
  142. call s:SetHighlight('Cursor', s:bg, s:caret, '')
  143. call s:SetHighlight('CursorColumn', '', s:line_highlight, '')
  144. call s:SetHighlight('CursorLine', '', s:line_highlight, '')
  145. call s:SetHighlight('CursorLineNr', s:comments, '', '')
  146. call s:SetHighlight('Directory', s:blue, '', '')
  147. call s:SetHighlight('DiffAdd', s:green, s:bg, '')
  148. call s:SetHighlight('DiffDelete', s:red, s:bg, '')
  149. call s:SetHighlight('DiffChange', s:yellow, s:bg, '')
  150. call s:SetHighlight('DiffText', s:orange, s:bg, '')
  151. call s:SetHighlight('ErrorMsg', s:bg, s:red, 'bold')
  152. call s:SetHighlight('FoldColumn', s:line_numbers, s:bg, '')
  153. call s:SetHighlight('Folded', s:brown, s:bg, 'bold')
  154. call s:SetHighlight('LineNr', s:line_numbers, '', '')
  155. call s:SetHighlight('MatchParen', s:caret, s:bg, 'bold')
  156. call s:SetHighlight('ModeMsg', s:green, '', '')
  157. call s:SetHighlight('MoreMsg', s:green, '', '')
  158. call s:SetHighlight('NonText', s:comments, '', '')
  159. call s:SetHighlight('Normal', s:fg, s:bg, '')
  160. call s:SetHighlight('Pmenu', s:fg, s:selection, '')
  161. call s:SetHighlight('PmenuSel', s:bg, s:cyan, '')
  162. call s:SetHighlight('PmenuSbar', '', s:selection, '')
  163. call s:SetHighlight('PmenuThumb', '', s:comments, '')
  164. call s:SetHighlight('Question', s:blue, '', '')
  165. call s:SetHighlight('IncSearch', s:white, s:comments, 'none')
  166. call s:SetHighlight('Search', s:white, s:comments, 'none')
  167. call s:SetHighlight('SignColumn', s:fg, s:bg, '')
  168. call s:SetHighlight('SpecialKey', s:comments, '', '')
  169. call s:SetHighlight('SpellCap', s:blue, '', 'undercurl')
  170. call s:SetHighlight('SpellBad', s:red, '', 'undercurl')
  171. call s:SetHighlight('StatusLine', s:fg, s:selection, '')
  172. call s:SetHighlight('StatusLineNC', s:comments, s:selection, '')
  173. call s:SetHighlight('StatusLineTerm', s:bg, s:green, '')
  174. call s:SetHighlight('StatusLineTermNC', s:bg, s:green, '')
  175. call s:SetHighlight('TabLine', s:fg, s:line_numbers, '')
  176. call s:SetHighlight('TabLineFill', s:fg, s:selection, '')
  177. call s:SetHighlight('TabLineSel', s:bg, s:cyan, '')
  178. call s:SetHighlight('Title', s:green, '', '')
  179. call s:SetHighlight('VertSplit', s:comments, '', '')
  180. call s:SetHighlight('Visual', s:fg, s:selection, '')
  181. call s:SetHighlight('WarningMsg', s:red, '', '')
  182. call s:SetHighlight('WildMenu', s:bg, s:cyan, '')
  183. " Syntax
  184. call s:SetHighlight('Comment', s:comments, '', 'italic')
  185. call s:SetHighlight('Conceal', s:brown, s:bg, '')
  186. call s:SetHighlight('Constant', s:orange, '', '')
  187. call s:SetHighlight('String', s:green, '', '')
  188. call s:SetHighlight('Character', s:green, '', '')
  189. call s:SetHighlight('Identifier', s:red, '', '')
  190. call s:SetHighlight('Function', s:blue, '', '')
  191. call s:SetHighlight('Statement', s:purple, '', '')
  192. call s:SetHighlight('Operator', s:cyan, '', '')
  193. call s:SetHighlight('PreProc', s:cyan, '', '')
  194. call s:SetHighlight('Include', s:blue, '', '')
  195. call s:SetHighlight('Define', s:purple, '', '')
  196. call s:SetHighlight('Macro', s:purple, '', '')
  197. call s:SetHighlight('Type', s:yellow, '', '')
  198. call s:SetHighlight('Structure', s:cyan, '', '')
  199. call s:SetHighlight('Special', s:violet, '', '')
  200. call s:SetHighlight('Underlined', s:blue, '', '')
  201. call s:SetHighlight('Error', s:bg, s:red, '')
  202. call s:SetHighlight('Todo', s:orange, s:bg, 'italic')
  203. " Legacy groups for official git.vim and diff.vim syntax
  204. hi! link diffFile DiffAdd
  205. hi! link diffNewFile DiffDelete
  206. hi! link diffAdded DiffAdd
  207. hi! link diffChanged DiffChange
  208. hi! link diffLine DiffChange
  209. hi! link diffRemoved DiffDelete
  210. " Git Commit Messages
  211. call s:SetHighlight('gitcommitHeader', s:purple, '', '')
  212. call s:SetHighlight('gitcommitUnmerged', s:green, '', '')
  213. call s:SetHighlight('gitcommitSelectedFile', s:green, '', '')
  214. call s:SetHighlight('gitcommitDiscardedFile', s:red, '', '')
  215. call s:SetHighlight('gitcommitUnmergedFile', s:yellow, '', '')
  216. call s:SetHighlight('gitcommitSelectedType', s:green, '', '')
  217. call s:SetHighlight('gitcommitSummary', s:blue, '', '')
  218. call s:SetHighlight('gitcommitDiscardedType', s:red, '', '')
  219. hi link gitcommitNoBranch gitcommitBranch
  220. hi link gitcommitUntracked gitcommitComment
  221. hi link gitcommitDiscarded gitcommitComment
  222. hi link gitcommitSelected gitcommitComment
  223. hi link gitcommitDiscardedArrow gitcommitDiscardedFile
  224. hi link gitcommitSelectedArrow gitcommitSelectedFile
  225. hi link gitcommitUnmergedArrow gitcommitUnmergedFile
  226. " Javascript
  227. call s:SetHighlight('javaScriptBraces', s:fg, '', '')
  228. call s:SetHighlight('javaScriptNull', s:orange, '', '')
  229. call s:SetHighlight('javaScriptIdentifier', s:purple, '', '')
  230. call s:SetHighlight('javaScriptNumber', s:orange, '', '')
  231. call s:SetHighlight('javaScriptRequire', s:cyan, '', '')
  232. call s:SetHighlight('javaScriptReserved', s:purple, '', '')
  233. " pangloss/vim-javascript
  234. if g:material_theme_style !~ '-community$'
  235. call s:SetHighlight('jsArrowFunction', s:purple, '', '')
  236. call s:SetHighlight('jsAsyncKeyword', s:purple, '', '')
  237. call s:SetHighlight('jsBooleanTrue', s:orange, '', '')
  238. call s:SetHighlight('jsBooleanFalse', s:orange, '', '')
  239. call s:SetHighlight('jsBrackets', s:pink, '', '')
  240. call s:SetHighlight('jsCatch', s:cyan, '', 'italic')
  241. call s:SetHighlight('jsClassBraces', s:cyan, '', '')
  242. call s:SetHighlight('jsClassDefinition', s:yellow, '', '')
  243. call s:SetHighlight('jsClassFuncName', s:pink, '', '')
  244. call s:SetHighlight('jsClassProperty', s:pink, '', '')
  245. call s:SetHighlight('jsClassKeyword', s:purple, '', '')
  246. call s:SetHighlight('jsConditional', s:cyan, '', 'italic')
  247. call s:SetHighlight('jsDocParam', s:green, '', '')
  248. call s:SetHighlight('jsDocTags', s:cyan, '', '')
  249. call s:SetHighlight('jsDot', s:cyan, '', '')
  250. call s:SetHighlight('jsException', s:cyan, '', 'italic')
  251. call s:SetHighlight('jsExceptions', s:yellow, '', '')
  252. call s:SetHighlight('jsExport', s:cyan, '', 'italic')
  253. call s:SetHighlight('jsExportDefault', s:cyan, '', 'italic')
  254. call s:SetHighlight('jsExtendsKeyword', s:purple, '', '')
  255. call s:SetHighlight('jsFinally', s:cyan, '', 'italic')
  256. call s:SetHighlight('jsFinallyBraces', s:cyan, '', '')
  257. call s:SetHighlight('jsFlowArgumentDef', s:yellow, '', '')
  258. call s:SetHighlight('jsForAwait', s:cyan, '', 'italic')
  259. call s:SetHighlight('jsFrom', s:cyan, '', 'italic')
  260. call s:SetHighlight('jsFuncBraces', s:cyan, '', '')
  261. call s:SetHighlight('jsFuncCall', s:blue, '', '')
  262. call s:SetHighlight('jsFuncParens', s:cyan, '', '')
  263. call s:SetHighlight('jsFunction', s:purple, '', '')
  264. call s:SetHighlight('jsFunctionKey', s:pink, '', '')
  265. call s:SetHighlight('jsGlobalObjects', s:yellow, '', '')
  266. call s:SetHighlight('jsGlobalNodeObjects', s:yellow, '', '')
  267. call s:SetHighlight('jsIfElseBraces', s:cyan, '', '')
  268. call s:SetHighlight('jsImport', s:cyan, '', 'italic')
  269. call s:SetHighlight('jsModuleAs', s:cyan, '', 'italic')
  270. call s:SetHighlight('jsModuleBraces', s:cyan, '', '')
  271. call s:SetHighlight('jsNull', s:cyan, '', '')
  272. call s:SetHighlight('jsNoise', s:cyan, '', '')
  273. call s:SetHighlight('jsObjectBraces', s:cyan, '', '')
  274. call s:SetHighlight('jsObjectColon', s:cyan, '', '')
  275. call s:SetHighlight('jsObjectKey', s:pink, '', '')
  276. call s:SetHighlight('jsObjectSeparator', s:cyan, '', '')
  277. call s:SetHighlight('jsParens', s:pink, '', '')
  278. call s:SetHighlight('jsRepeat', s:cyan, '', 'italic')
  279. call s:SetHighlight('jsReturn', s:cyan, '', 'italic')
  280. call s:SetHighlight('jsStorageClass', s:purple, '', '')
  281. call s:SetHighlight('jsTemplateBraces', s:cyan, '', '')
  282. call s:SetHighlight('jsTemplateExpression', s:fg, '', '')
  283. call s:SetHighlight('jsTemplateString', s:green, '', '')
  284. call s:SetHighlight('jsThis', s:cyan, '', 'italic')
  285. call s:SetHighlight('jsTry', s:cyan, '', 'italic')
  286. call s:SetHighlight('jsTryCatchBraces', s:cyan, '', '')
  287. call s:SetHighlight('jsUndefined', s:cyan, '', '')
  288. else
  289. call s:SetHighlight('jsArrowFunction', s:purple, '', '')
  290. call s:SetHighlight('jsAsyncKeyword', s:purple, '', '')
  291. call s:SetHighlight('jsExtendsKeyword', s:purple, '', '')
  292. call s:SetHighlight('jsClassKeyword', s:purple, '', '')
  293. call s:SetHighlight('jsDocParam', s:green, '', '')
  294. call s:SetHighlight('jsDocTags', s:cyan, '', '')
  295. call s:SetHighlight('jsForAwait', s:purple, '', '')
  296. call s:SetHighlight('jsFlowArgumentDef', s:yellow, '', '')
  297. call s:SetHighlight('jsFrom', s:purple, '', '')
  298. call s:SetHighlight('jsImport', s:purple, '', '')
  299. call s:SetHighlight('jsExport', s:purple, '', '')
  300. call s:SetHighlight('jsExportDefault', s:purple, '', '')
  301. call s:SetHighlight('jsFuncCall', s:blue, '', '')
  302. call s:SetHighlight('jsFunction', s:purple, '', '')
  303. call s:SetHighlight('jsGlobalObjects', s:yellow, '', '')
  304. call s:SetHighlight('jsGlobalNodeObjects', s:yellow, '', '')
  305. call s:SetHighlight('jsModuleAs', s:purple, '', '')
  306. call s:SetHighlight('jsNull', s:orange, '', '')
  307. call s:SetHighlight('jsStorageClass', s:purple, '', '')
  308. call s:SetHighlight('jsTemplateBraces', s:red, '', '')
  309. call s:SetHighlight('jsTemplateExpression', s:red, '', '')
  310. call s:SetHighlight('jsThis', s:red, '', '')
  311. call s:SetHighlight('jsUndefined', s:orange, '', '')
  312. endif
  313. " MaxMEllon/vim-jsx-pretty
  314. call s:SetHighlight('jsxTag', s:cyan, '', '')
  315. call s:SetHighlight('jsxTagName', s:pink, '', '')
  316. call s:SetHighlight('jsxComponentName', s:yellow, '', '')
  317. call s:SetHighlight('jsxCloseTag', s:cyan, '', '')
  318. call s:SetHighlight('jsxEscapeJs', s:fg, '', '')
  319. call s:SetHighlight('jsxCloseString', s:cyan, '', '')
  320. call s:SetHighlight('jsxAttrib', s:purple, '', 'italic')
  321. call s:SetHighlight('jsxString', s:green, '', '')
  322. call s:SetHighlight('jsxEqual', s:purple, '', '')
  323. call s:SetHighlight('jsxDot', s:cyan, '', '')
  324. call s:SetHighlight('jsxSpreadOperator', s:purple, '', '')
  325. call s:SetHighlight('jsxBraces', s:cyan, '', '')
  326. call s:SetHighlight('jsxNamespace', s:cyan, '', '')
  327. " JSON
  328. call s:SetHighlight('jsonBraces', s:fg, '', '')
  329. " CSS
  330. call s:SetHighlight('cssAttrComma', s:fg, '', '')
  331. call s:SetHighlight('cssPseudoClassId', s:yellow, '', '')
  332. call s:SetHighlight('cssBraces', s:fg, '', '')
  333. call s:SetHighlight('cssClassName', s:yellow, '', '')
  334. call s:SetHighlight('cssClassNameDot', s:yellow, '', '')
  335. call s:SetHighlight('cssFunctionName', s:blue, '', '')
  336. call s:SetHighlight('cssImportant', s:cyan, '', '')
  337. call s:SetHighlight('cssIncludeKeyword', s:purple, '', '')
  338. call s:SetHighlight('cssTagName', s:red, '', '')
  339. call s:SetHighlight('cssMediaType', s:orange, '', '')
  340. call s:SetHighlight('cssProp', s:fg, '', '')
  341. call s:SetHighlight('cssSelectorOp', s:cyan, '', '')
  342. call s:SetHighlight('cssSelectorOp2', s:cyan, '', '')
  343. " Sass
  344. call s:SetHighlight('sassAmpersand', s:red, '', '')
  345. call s:SetHighlight('sassClassChar', s:yellow, '', '')
  346. call s:SetHighlight('sassMixinName', s:blue, '', '')
  347. call s:SetHighlight('sassVariable', s:purple, '', '')
  348. " Less
  349. call s:SetHighlight('lessAmpersand', s:red, '', '')
  350. call s:SetHighlight('lessClassChar', s:yellow, '', '')
  351. call s:SetHighlight('lessCssAttribute', s:fg, '', '')
  352. call s:SetHighlight('lessFunction', s:blue, '', '')
  353. call s:SetHighlight('lessVariable', s:purple, '', '')
  354. " HTML
  355. call s:SetHighlight('htmlTagName', s:pink, '', '')
  356. call s:SetHighlight('htmlEndTag', s:cyan, '', '')
  357. call s:SetHighlight('htmlTag', s:cyan, '', '')
  358. call s:SetHighlight('htmlSpecialTagName', s:yellow, '', '')
  359. call s:SetHighlight('htmlArg', s:purple, '', 'italic')
  360. call s:SetHighlight('htmlTitle', s:fg, '', '')
  361. call s:SetHighlight('htmlLink', s:fg, '', '')
  362. "" Consistency with plasticboy/vim-markdown
  363. call s:SetHighlight('htmlBold', s:pink, '', 'bold')
  364. call s:SetHighlight('htmlH1', s:yellow, '', '')
  365. call s:SetHighlight('htmlH2', s:yellow, '', '')
  366. call s:SetHighlight('htmlH3', s:yellow, '', '')
  367. call s:SetHighlight('htmlH4', s:yellow, '', '')
  368. call s:SetHighlight('htmlH5', s:yellow, '', '')
  369. call s:SetHighlight('htmlH6', s:yellow, '', '')
  370. call s:SetHighlight('htmlItalic', s:pink, '', 'italic')
  371. " XML
  372. call s:SetHighlight('xmlAttrib', s:purple, '', 'italic')
  373. call s:SetHighlight('xmlEndTag', s:cyan, '', '')
  374. call s:SetHighlight('xmlTag', s:cyan, '', '')
  375. call s:SetHighlight('xmlTagName', s:pink, '', '')
  376. " Golang
  377. call s:SetHighlight('goFunctionCall', s:blue, '', '')
  378. call s:SetHighlight('goReceiverType', s:green, '', '')
  379. call s:SetHighlight('goParamName', s:orange, '', '')
  380. call s:SetHighlight('goParamType', s:green, '', '')
  381. call s:SetHighlight('goTypeDecl', s:purple, '', '')
  382. call s:SetHighlight('goTypeName', s:yellow, '', '')
  383. call s:SetHighlight('goBuiltins', s:red, '', '')
  384. call s:SetHighlight('goType', s:purple, '', '')
  385. call s:SetHighlight('goSignedInts', s:purple, '', '')
  386. call s:SetHighlight('goUnsignedInts', s:purple, '', '')
  387. call s:SetHighlight('goFloats', s:purple, '', '')
  388. call s:SetHighlight('goComplexes', s:purple, '', '')
  389. " Ruby
  390. call s:SetHighlight('rubyInterpolation', s:cyan, '', '')
  391. call s:SetHighlight('rubyInterpolationDelimiter', s:violet, '', '')
  392. call s:SetHighlight('rubyRegexp', s:cyan, '', '')
  393. call s:SetHighlight('rubyRegexpDelimiter', s:violet, '', '')
  394. call s:SetHighlight('rubyStringDelimiter', s:green, '', '')
  395. " Rust
  396. call s:SetHighlight('CocRustTypeHint', s:invisibles, '', '')
  397. call s:SetHighlight('CocRustChainingHint', s:invisibles, '', '')
  398. " TeX
  399. call s:SetHighlight('texBeginEndName', s:blue, '', '')
  400. call s:SetHighlight('texMathMatcher', s:blue, '', '')
  401. call s:SetHighlight('texCite', s:green, '', '')
  402. call s:SetHighlight('texRefZone', s:green, '', '')
  403. call s:SetHighlight('texInputFile', s:green, '', '')
  404. call s:SetHighlight('texMath', s:orange, '', '')
  405. call s:SetHighlight('texMathOper', s:yellow, '', '')
  406. " Markdown
  407. if g:material_theme_style !~ '-community$'
  408. call s:SetHighlight('markdownBold', s:pink, '', 'bold')
  409. call s:SetHighlight('markdownBoldDelimiter', s:cyan, '', '')
  410. call s:SetHighlight('markdownCode', s:paleblue, '', '')
  411. call s:SetHighlight('markdownCodeDelimiter', s:green, '', '')
  412. call s:SetHighlight('markdownHeadingDelimiter', s:cyan, '', '')
  413. call s:SetHighlight('markdownH1', s:yellow, '', '')
  414. call s:SetHighlight('markdownH2', s:yellow, '', '')
  415. call s:SetHighlight('markdownH3', s:yellow, '', '')
  416. call s:SetHighlight('markdownH4', s:yellow, '', '')
  417. call s:SetHighlight('markdownH5', s:yellow, '', '')
  418. call s:SetHighlight('markdownH6', s:yellow, '', '')
  419. call s:SetHighlight('markdownItalic', s:pink, '', 'italic')
  420. call s:SetHighlight('markdownItalicDelimiter', s:cyan, '', '')
  421. call s:SetHighlight('markdownLinkDelimiter', s:cyan, '', '')
  422. call s:SetHighlight('markdownLinkText', s:green, '', '')
  423. call s:SetHighlight('markdownLinkTextDelimiter', s:cyan, '', '')
  424. call s:SetHighlight('markdownListMarker', s:cyan, '', '')
  425. call s:SetHighlight('markdownUrl', s:pink, '', 'underline')
  426. call s:SetHighlight('markdownUrlTitleDelimiter', s:green, '', '')
  427. else
  428. call s:SetHighlight('markdownBold', s:yellow, '', 'bold')
  429. call s:SetHighlight('markdownCode', s:cyan, '', '')
  430. call s:SetHighlight('markdownCodeBlock', s:cyan, '', '')
  431. call s:SetHighlight('markdownCodeDelimiter', s:cyan, '', '')
  432. call s:SetHighlight('markdownHeadingDelimiter', s:green, '', '')
  433. call s:SetHighlight('markdownHeadingRule', s:comments, '', '')
  434. call s:SetHighlight('markdownId', s:purple, '', '')
  435. call s:SetHighlight('markdownItalic', s:blue, '', 'italic')
  436. call s:SetHighlight('markdownListMarker', s:orange, '', '')
  437. call s:SetHighlight('markdownOrderedListMarker', s:orange, '', '')
  438. call s:SetHighlight('markdownRule', s:comments, '', '')
  439. call s:SetHighlight('markdownUrl', s:purple, '', '')
  440. call s:SetHighlight('markdownUrlTitleDelimiter', s:yellow, '', '')
  441. endif
  442. " plasticboy/vim-markdown
  443. if g:material_theme_style !~ '-community$'
  444. call s:SetHighlight('mkdBold', s:cyan, '', '')
  445. call s:SetHighlight('mkdCodeStart', s:green, '', '')
  446. call s:SetHighlight('mkdCodeDelimiter', s:cyan, '', '')
  447. call s:SetHighlight('mkdDelimiter', s:cyan, '', '')
  448. call s:SetHighlight('mkdHeading', s:cyan, '', '')
  449. call s:SetHighlight('mkdItalic', s:cyan, '', '')
  450. call s:SetHighlight('mkdLink', s:green, '', '')
  451. call s:SetHighlight('mkdListItem', s:cyan, '', '')
  452. call s:SetHighlight('mkdURL', s:pink, '', 'underline')
  453. endif
  454. " vimwiki/vimwiki
  455. if g:material_theme_style !~ '-community$'
  456. call s:SetHighlight('VimwikiBold', s:pink, '', 'bold')
  457. call s:SetHighlight('VimwikiBoldChar', s:cyan, '', 'bold')
  458. call s:SetHighlight('VimwikiDelText', s:pink, '', 'strikethrough')
  459. call s:SetHighlight('VimwikiDelTextChar', s:cyan, '', '')
  460. call s:SetHighlight('VimwikiCode', s:green, '', '')
  461. call s:SetHighlight('VimwikiCodeChar', s:cyan, '', '')
  462. call s:SetHighlight('VimwikiHeader1', s:yellow, '', '')
  463. call s:SetHighlight('VimwikiHeader2', s:yellow, '', '')
  464. call s:SetHighlight('VimwikiHeader3', s:yellow, '', '')
  465. call s:SetHighlight('VimwikiHeader4', s:yellow, '', '')
  466. call s:SetHighlight('VimwikiHeader5', s:yellow, '', '')
  467. call s:SetHighlight('VimwikiHeader6', s:yellow, '', '')
  468. call s:SetHighlight('VimwikiHeaderChar', s:cyan, '', '')
  469. call s:SetHighlight('VimwikiImage', s:cyan, '', '')
  470. call s:SetHighlight('VimwikiItalic', s:pink, '', 'italic')
  471. call s:SetHighlight('VimwikiItalicChar', s:cyan, '', '')
  472. call s:SetHighlight('VimwikiLink', s:green, '', 'underline')
  473. call s:SetHighlight('VimwikiListTodo', s:cyan, '', '')
  474. call s:SetHighlight('VimwikiPre', s:green, '', '')
  475. call s:SetHighlight('VimwikiWebLink1', s:green, '', 'underline')
  476. endif
  477. " vim-gitgutter
  478. call s:SetHighlight('GitGutterAdd', s:green, '', '')
  479. call s:SetHighlight('GitGutterChange', s:yellow, '', '')
  480. call s:SetHighlight('GitGutterChangeDelete', s:orange, '', '')
  481. call s:SetHighlight('GitGutterDelete', s:red, '', '')
  482. " vim-signify
  483. hi link SignifySignAdd GitGutterAdd
  484. hi link SignifySignChange GitGutterChange
  485. hi link SignifySignDelete GitGutterDelete
  486. " vim-better-whitespace
  487. call s:SetHighlight('ExtraWhitespace', '', s:red, '')
  488. " NERDTree
  489. if has('nvim')
  490. call s:SetHighlight('NERDTreeFile', s:fg, '', '')
  491. endif
  492. " coc.nvim
  493. call s:SetHighlight('CocMarkdownLink', s:purple, '', '')
  494. call s:SetHighlight('CocErrorSign', s:red, '', '')
  495. call s:SetHighlight('CocWarningSign', s:orange, '', '')
  496. call s:SetHighlight('CocHintSign', s:yellow, '', '')
  497. call s:SetHighlight('CocInfoSign', s:green, '', '')
  498. " Neovim terminal colors
  499. if has('nvim')
  500. let g:terminal_color_background = s:bg.gui
  501. let g:terminal_color_foreground = s:fg.gui
  502. let g:terminal_color_0 = s:comments.gui
  503. let g:terminal_color_1 = s:red.gui
  504. let g:terminal_color_2 = s:green.gui
  505. let g:terminal_color_3 = s:yellow.gui
  506. let g:terminal_color_4 = s:blue.gui
  507. let g:terminal_color_5 = s:purple.gui
  508. let g:terminal_color_6 = s:cyan.gui
  509. let g:terminal_color_7 = s:white.gui
  510. let g:terminal_color_8 = g:terminal_color_0
  511. let g:terminal_color_9 = g:terminal_color_1
  512. let g:terminal_color_10 = g:terminal_color_2
  513. let g:terminal_color_11 = g:terminal_color_3
  514. let g:terminal_color_12 = g:terminal_color_4
  515. let g:terminal_color_13 = g:terminal_color_5
  516. let g:terminal_color_14 = g:terminal_color_6
  517. let g:terminal_color_15 = g:terminal_color_7
  518. endif
  519. " Tree-sitter
  520. call s:SetHighlight('TSAttribute', s:yellow, '', '')
  521. call s:SetHighlight('TSBoolean', s:pink, '', '')
  522. call s:SetHighlight('TSConditional', s:cyan, '', 'italic')
  523. call s:SetHighlight('TSConstructor', s:yellow, '', '')
  524. call s:SetHighlight('TSConstBuiltin', s:cyan, '', '')
  525. call s:SetHighlight('TSException', s:cyan, '', 'italic')
  526. call s:SetHighlight('TSField', s:white, '', '')
  527. call s:SetHighlight('TSFunction', s:blue, '', '')
  528. call s:SetHighlight('TSFuncBuiltin', s:blue, '', '')
  529. call s:SetHighlight('TSInclude', s:cyan, '', 'italic')
  530. call s:SetHighlight('TSKeyword', s:purple, '', '')
  531. call s:SetHighlight('TSKeywordOperator', s:cyan, '', 'italic')
  532. call s:SetHighlight('TSKeywordFunction', s:purple, '', '')
  533. call s:SetHighlight('TSKeywordReturn', s:cyan, '', 'italic')
  534. call s:SetHighlight('TSMethod', s:blue, '', '')
  535. call s:SetHighlight('TSOperator', s:cyan, '', '')
  536. call s:SetHighlight('TSParameter', s:fg, '', '')
  537. call s:SetHighlight('TSProperty', s:fg, '', '')
  538. call s:SetHighlight('TSPunctBracket', s:cyan, '', '')
  539. call s:SetHighlight('TSPunctDelimiter', s:cyan, '', '')
  540. call s:SetHighlight('TSRepeat', s:cyan, '', 'italic')
  541. call s:SetHighlight('TSTag', s:pink, '', '')
  542. call s:SetHighlight('TSTagDelimiter', s:cyan, '', '')
  543. call s:SetHighlight('TSTagAttribute', s:purple, '', '')
  544. call s:SetHighlight('TSType', s:yellow, '', '')
  545. call s:SetHighlight('TSVariable', s:fg, '', '')
  546. call s:SetHighlight('TSVariableBuiltin', s:fg, '', '')