You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

270 lines
10 KiB

5 years ago
  1. " Vim Color File
  2. " Name: plastic.vim
  3. " Description: VSCode Plastic theme vim/neovim port
  4. " Author: Florian Prz
  5. " Repository: https://github.com/flrnprz/plastic.vim/
  6. " License: The MIT License (MIT)
  7. " Init {{{
  8. scriptencoding utf-8
  9. set background=dark
  10. hi clear
  11. if exists('syntax_on')
  12. syntax reset
  13. endif
  14. let g:colors_name = 'plastic'
  15. " Highlighting function (inspiration from https://github.com/chriskempson/base16-vim)
  16. fun! <sid>hi(group, fg, bg, attr, sp)
  17. if !empty(a:fg)
  18. exec "hi " . a:group . " guifg=" . a:fg.gui . " ctermfg=" . a:fg.cterm256
  19. endif
  20. if !empty(a:bg)
  21. exec "hi " . a:group . " guibg=" . a:bg.gui . " ctermbg=" . a:bg.cterm256
  22. endif
  23. if a:attr != ""
  24. exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
  25. endif
  26. if !empty(a:sp)
  27. exec "hi " . a:group . " guisp=" . a:sp.gui
  28. endif
  29. endfun
  30. "}}}
  31. " colors definition {{{
  32. let s:red = {'gui': '#e06c75', 'cterm256': '204'}
  33. let s:green = { 'gui': '#98c379', 'cterm256': '114'}
  34. let s:yellow = { 'gui': '#e5c07b', 'cterm256': '180'}
  35. let s:whisky = { 'gui': '#d19a66', 'cterm256': '173' }
  36. let s:blue = { 'gui': '#61afef', 'cterm256': '39'}
  37. let s:purple = { 'gui': '#af98e6', 'cterm256': '170'}
  38. let s:aqua = { 'gui': '#56b6c2', 'cterm256': '38'}
  39. let s:white = { 'gui': '#d7d7d7', 'cterm256': '145'}
  40. let s:black = { 'gui': '#181a1f', 'cterm256': '234'}
  41. let s:visual_black = { 'gui': 'NONE', 'cterm256': 'NONE'}
  42. let s:background = {'gui': '#21252b', 'cterm256': '235'}
  43. let s:foreground = {'gui': '#a9b2c3', 'cterm256': '235'}
  44. let s:grey = { 'gui': '#abb2bf', 'cterm256': '59' }
  45. let s:punctuation = { 'gui': '#7c8696', 'cterm256': '238' }
  46. let s:none = {'gui': 'NONE', 'cterm256': 'NONE'}
  47. " }}}
  48. "--------------------
  49. " Syntax Definitions
  50. "--------------------
  51. " <sid>hi(GROUP, FOREGROUND, BACKGROUND, ATTRIBUTE, SPECIAL)
  52. call <sid>hi('Normal', s:white, s:background, 'none', {})
  53. " UI {{{
  54. call <sid>hi('Cursor', s:none, s:none, 'inverse', {})
  55. hi link lCursor Cursor
  56. hi link CursorIM Cursor
  57. call <sid>hi('CursorLine', s:white, s:none, 'bold', {})
  58. call <sid>hi('EndOfBuffer', s:whisky, s:none, 'none', {})
  59. call <sid>hi('Conceal', s:blue, s:none, 'none', {})
  60. call <sid>hi('CursorColumn', s:none, s:blue, 'none', {})
  61. call <sid>hi('ColorColumn', s:none, s:punctuation, 'none', {})
  62. call <sid>hi('FoldColumn', s:punctuation, s:background, 'none', {})
  63. call <sid>hi('SignColumn', s:none, s:background, 'none', {})
  64. call <sid>hi('VertSplit', s:grey, s:background, 'none', {})
  65. call <sid>hi('LineNr', s:punctuation, s:background, 'none', {})
  66. call <sid>hi('CursorLineNr', s:punctuation, s:background, 'none', {})
  67. call <sid>hi('DiffAdd', s:black, s:green, 'none', {})
  68. call <sid>hi('DiffChange', s:black, s:purple, 'none', {})
  69. call <sid>hi('DiffDelete', s:black, s:red, 'none', {})
  70. call <sid>hi('DiffText', s:black, s:aqua, 'none', {})
  71. call <sid>hi('ErrorMsg', s:red, s:background, 'bold', {})
  72. call <sid>hi('ModeMsg', s:yellow, s:none, 'bold', {})
  73. call <sid>hi('MoreMsg', s:aqua, s:none, 'bold', {})
  74. call <sid>hi('WarningMsg', s:whisky, s:none, 'italic', {})
  75. call <sid>hi('Noise', s:punctuation, s:none, 'none', {})
  76. call <sid>hi('NonText', s:whisky, s:none, 'none', {})
  77. call <sid>hi('Folded', s:grey, s:none, 'none', {})
  78. call <sid>hi('IncSearch', s:yellow, s:black, 'none', {})
  79. call <sid>hi('Search', s:yellow, s:background, 'reverse', {})
  80. call <sid>hi('Pmenu', s:none, s:black, 'none', {})
  81. call <sid>hi('PmenuSel', s:black, s:white, 'none', {})
  82. call <sid>hi('Question', s:white, s:background, 'bold', {})
  83. call <sid>hi('MatchParen', s:blue, s:none, 'bold', {})
  84. call <sid>hi('Directory', s:white, s:background, 'bold', {})
  85. call <sid>hi('QuickFixLine', s:black, s:yellow, 'none', {})
  86. call <sid>hi('SpecialKey', s:purple, s:none, 'none', {})
  87. call <sid>hi('SpellBad', s:red, s:none, 'undercurl', s:red)
  88. call <sid>hi('SpellCap', s:none, s:none, 'undercurl', {})
  89. call <sid>hi('SpellLocal', s:none, s:none, 'undercurl', {})
  90. call <sid>hi('SpellRare', s:none, s:none, 'undercurl', {})
  91. call <sid>hi('StatusLine', s:white, s:background, 'none', {})
  92. call <sid>hi('StatusLineNC', s:white, s:background, 'none', {})
  93. hi link StatusLineTerm StatusLine
  94. hi link StatusLineTermNC StatusLineNC
  95. call <sid>hi('TabLine', s:white, s:black, 'none', {})
  96. hi link TabLineFill TabLine
  97. call <sid>hi('TabLineSel', s:whisky, s:black, 'none', {})
  98. call <sid>hi('Title', s:white, s:none, 'none', {})
  99. call <sid>hi('Visual', s:black, s:white, 'none', {})
  100. hi link VisualNOS Visual
  101. call <sid>hi('TabLine', s:white, s:black, 'none', {})
  102. call <sid>hi('WildMenu', s:black, s:white, 'bold', {})
  103. "}}}
  104. "----------------------------------------------------
  105. " Syntax groups and naming convenions
  106. " http://vimdoc.sourceforge.net/htmldoc/syntax.html
  107. "----------------------------------------------------
  108. " {{{
  109. call <sid>hi('Comment', s:grey, s:none, 'italic', {})
  110. call <sid>hi('Constant', s:aqua, s:none, 'none', {})
  111. call <sid>hi('String', s:green, s:none, 'none', {})
  112. hi link Character Constant
  113. hi link Number Constant
  114. hi link Boolean Constant
  115. hi link Float Number
  116. call <sid>hi('Identifier', s:white, s:none, 'none', {})
  117. call <sid>hi('Function', s:whisky, s:none, 'none', {})
  118. call <sid>hi('Statement', s:red, s:none, 'none', {})
  119. hi link Conditional Statement
  120. call <sid>hi('PreProc', s:aqua, s:none, 'none', {})
  121. call <sid>hi('Type', s:blue, s:none, 'none', {})
  122. call <sid>hi('Special', s:punctuation, s:none, 'none', {})
  123. call <sid>hi('Underlined', s:blue, s:none, 'underline', {})
  124. call <sid>hi('Ignore', s:none, s:none, 'none', {})
  125. call <sid>hi('Error', s:red, s:black, 'undercurl', {})
  126. call <sid>hi('Todo', s:aqua, s:none, 'italic', {})
  127. "}}}
  128. "--------------------------
  129. " Language specific syntax
  130. "--------------------------
  131. " HTML {{{
  132. call <sid>hi('htmlTag', s:punctuation, s:none, 'none', {})
  133. hi link htmlEndTag htmlTag
  134. call <sid>hi('htmlTagName', s:blue, s:none, 'none', {})
  135. call <sid>hi('htmlArg', s:whisky, s:none, 'none', {})
  136. call <sid>hi('htmlTitle', s:white, s:none, 'none', {})
  137. "}}}
  138. " XML {{{
  139. call <sid>hi('xmlRegion', s:white, s:none, 'none', {})
  140. hi link xmlTag xmlRegion
  141. call <sid>hi('xmlTagName', s:yellow, s:none, 'none', {})
  142. call <sid>hi('xmlEndTag', s:punctuation, s:none, 'none', {})
  143. " }}}
  144. " Css {{{
  145. call <sid>hi('cssAttrComma', s:punctuation, s:none, 'none', {})
  146. call <sid>hi('cssAttributeSelector', s:green, s:none, 'none', {})
  147. call <sid>hi('cssBraces', s:punctuation, s:none, 'none', {})
  148. call <sid>hi('cssClassName', s:aqua, s:none, 'none', {})
  149. call <sid>hi('cssDefinition', s:purple, s:none, 'none', {})
  150. call <sid>hi('cssFontAttr', s:whisky, s:none, 'none', {})
  151. call <sid>hi('cssFontDescriptor', s:purple, s:none, 'none', {})
  152. call <sid>hi('cssFunctionName', s:blue, s:none, 'none', {})
  153. call <sid>hi('cssIdentifier', s:blue, s:none, 'none', {})
  154. call <sid>hi('cssImportant', s:purple, s:none, 'none', {})
  155. call <sid>hi('cssInclude', s:white, s:none, 'none', {})
  156. call <sid>hi('cssIncludeKeyword', s:red, s:none, 'none', {})
  157. call <sid>hi('cssMediaType', s:aqua, s:none, 'none', {})
  158. call <sid>hi('cssProp', s:white, s:none, 'none', {})
  159. call <sid>hi('cssPseudoClassId', s:whisky, s:none, 'none', {})
  160. call <sid>hi('cssTagName', s:whisky, s:none, 'none', {})
  161. call <sid>hi('cssSelectorOp', s:purple, s:none, 'none', {})
  162. call <sid>hi('cssSelectorOp2', s:purple, s:none, 'none', {})
  163. "}}}
  164. " Javascript {{{
  165. call <sid>hi('jsImport', s:red, s:none, 'none', {})
  166. hi link jsExport jsImport
  167. hi link jsFrom jsImport
  168. hi link jsExportDefault jsExport
  169. hi link jsArrowFunction jsImport
  170. call <sid>hi('jsStorageClass', s:blue, s:none, 'none', {})
  171. call <sid>hi('jsClassKeyword', s:blue, s:none, 'none', {})
  172. call <sid>hi('jsExtendsKeyword', s:blue, s:none, 'none', {})
  173. call <sid>hi('jsThis', s:yellow, s:none, 'none', {})
  174. "}}}
  175. " JSX {{{
  176. " https://github.com/MaxMEllon/vim-jsx-pretty
  177. call <sid>hi('jsxTagName', s:yellow, s:none, 'none', {})
  178. call <sid>hi('jsxPunct', s:punctuation, s:none, 'none', {})
  179. call <sid>hi('jsClosePunct', s:punctuation, s:none, 'none', {})
  180. call <sid>hi('jsxAttrib', s:whisky, s:none, 'none', {})
  181. call <sid>hi('jsxComponentName', s:blue, s:none, 'none', {})
  182. hi link jsxCloseString jsClosePunct
  183. "}}}
  184. " Golang {{{
  185. call <sid>hi('goDirective', s:aqua, s:none, 'none', {})
  186. call <sid>hi('goConstants', s:white, s:none, 'none', {})
  187. call <sid>hi('goDeclaration', s:red, s:none, 'none', {})
  188. call <sid>hi('goDeclType', s:whisky, s:none, 'none', {})
  189. call <sid>hi('goBuiltins', s:whisky, s:none, 'none', {})
  190. call <sid>hi('goFunctionCall', s:whisky, s:none, 'none', {})
  191. call <sid>hi('goVarAssign', s:white, s:none, 'none', {})
  192. hi link goVarDefs goVarAssign
  193. "}}}
  194. " Markdown {{{
  195. call <sid>hi('markdownCode', s:green, s:none, 'none', {})
  196. hi link markdownCodeBlock markdownCode
  197. hi link markdownCodeDelimiter markdownCode
  198. call <sid>hi('markdownHeadingDelimiter', s:whisky, s:none, 'none', {})
  199. call <sid>hi('markdownRule', s:punctuation, s:none, 'none', {})
  200. call <sid>hi('markdownHeadingRule', s:punctuation, s:none, 'none', {})
  201. call <sid>hi('markdownH1', s:whisky, s:none, 'none', {})
  202. hi link markdownH2 markdownH1
  203. hi link markdownH3 markdownH1
  204. hi link markdownH4 markdownH1
  205. hi link markdownH5 markdownH1
  206. hi link markdownH6 markdownH1
  207. call <sid>hi('markdownIdDelimiter', s:purple, s:none, 'none', {})
  208. call <sid>hi('markdownId', s:purple, s:none, 'none', {})
  209. call <sid>hi('markdownBlockquote', s:aqua, s:none, 'none', {})
  210. call <sid>hi('markdowItalic', s:none, s:none, 'italic', {})
  211. call <sid>hi('markdownBold', s:none, s:none, 'bold', {})
  212. call <sid>hi('markdownListMarker', s:blue, s:none, 'none', {})
  213. call <sid>hi('markdownOrderedListMarker', s:blue, s:none, 'none', {})
  214. call <sid>hi('markdownIdDeclaration', s:blue, s:none, 'none', {})
  215. call <sid>hi('markdownLinkText', s:blue, s:none, 'none', {})
  216. call <sid>hi('markdownLinkDelimiter', s:white, s:none, 'none', {})
  217. call <sid>hi('markdownUrl', s:purple, s:none, 'none', {})
  218. "}}}
  219. " NERDTree {{{
  220. call <sid>hi('NERDTreeDir', s:blue, s:none, 'none', {})
  221. call <sid>hi('NERDTreeDirSlash', s:whisky, s:none, 'none', {})
  222. call <sid>hi('NERDTreeFile', s:aqua, s:none, 'none', {})
  223. call <sid>hi('NERDTreeExecFile', s:green, s:none, 'none', {})
  224. call <sid>hi('NERDTreeOpenable', s:whisky, s:none, 'none', {})
  225. call <sid>hi('NERDTreeClosable', s:red, s:none, 'none', {})
  226. call <sid>hi('NERDTreeCWD', s:blue, s:none, 'bold', {})
  227. call <sid>hi('NERDTreeUp', s:punctuation, s:none, 'none', {})
  228. " }}}
  229. " vim: fdm=marker ts=2 sts=2 sw=2 fdl=0: