oceanicnext.vim 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902
  1. " ==============================================================================
  2. " Name: Oceanic Next
  3. " Description: Adaptation of the Oceanic Next color palette for (Neo)Vim
  4. " Repository: https://github.com/adrian5/oceanic-next-vim
  5. " License: MIT
  6. " ==============================================================================
  7. " ==============================================================================
  8. " ***** Setup ******************************************************************
  9. " ==============================================================================
  10. " {{{
  11. " ----- Init --------------------------------------------------------------- {{{
  12. highlight clear
  13. if exists("syntax_on")
  14. syntax reset
  15. endif
  16. let g:colors_name = "oceanicnext"
  17. set background=dark
  18. " }}}
  19. " ----- Config ------------------------------------------------------------- {{{
  20. let s:config = {}
  21. let s:config.gutter_like_bg = get(g:, "oceanic_gutter_like_bg", 0)
  22. let s:config.italic_comments = get(g:, "oceanic_italic_comments", 0)
  23. let s:config.transparent_bg = get(g:, "oceanic_transparent_bg", 0)
  24. if get(g:, "oceanic_bold", 1)
  25. let s:bold = "bold,"
  26. " NOTE: vim gracefully handles trailing commas in assigned values
  27. else
  28. let s:bold = ""
  29. endif
  30. " }}}
  31. " ----- Highlight Function ------------------------------------------------- {{{
  32. " NOTE: A different function is used based on terminal support. This simplifies
  33. " logic and evades potential issues with `guisp` support. Arguments are
  34. " positional; setting `gui` or `guisp` requires setting all preceding arguments!
  35. "
  36. " Usage: s:HL(target, fg[2], bg[2], gui, guisp[2])
  37. if (has("termguicolors") && &termguicolors) || has("gui_running")
  38. function! s:HL(target, fg, ...) abort
  39. let hls = [
  40. \ "hi", a:target,
  41. \ "guifg=" . a:fg[0]
  42. \ ]
  43. " Background
  44. if a:0 >= 1
  45. call add(hls, "guibg=" . a:1[0])
  46. else
  47. call add(hls, "guibg=NONE")
  48. endif
  49. " Text-style (see `:h attr-list`)
  50. if a:0 >= 2 && strlen(a:2)
  51. call add(hls, "cterm=" . a:2 . " gui=" . a:2)
  52. " NOTE: `cterm` applies to modern terminals too, `gui` is for true GUIs.
  53. else
  54. call add(hls, "cterm=NONE gui=NONE")
  55. endif
  56. " Coloring of undercurl/line
  57. if a:0 >= 3
  58. call add(hls, "guisp=" . a:3[0])
  59. endif
  60. execute join(hls, " ")
  61. endfunction
  62. else " 256-color term (assume no `guisp` support)
  63. function! s:HL(target, fg, ...) abort
  64. let hls = [
  65. \ "hi", a:target,
  66. \ "ctermfg=" . a:fg[1]
  67. \ ]
  68. " Background
  69. if a:0 >= 1
  70. call add(hls, "ctermbg=" . a:1[1])
  71. else
  72. call add(hls, "ctermbg=NONE")
  73. endif
  74. " Text-style
  75. if a:0 >= 2 && strlen(a:2)
  76. call add(hls, "cterm=" . a:2)
  77. else
  78. call add(hls, "cterm=NONE")
  79. endif
  80. execute join(hls, " ")
  81. endfunction
  82. endif
  83. " }}}
  84. " ========================================================================== }}}
  85. " ==============================================================================
  86. " ***** Oceanic Colors *********************************************************
  87. " ==============================================================================
  88. " {{{
  89. " ----- Oceanic Color Palette ---------------------------------------------- {{{
  90. " Foreground shades
  91. let s:fg1 = ["#405860", 239]
  92. let s:fg2 = ["#4d616b", 240]
  93. let s:fg3 = ["#65737e", 242]
  94. let s:fg4 = ["#adb5c0", 249]
  95. let s:fg5 = ["#d8dee9", 253]
  96. let s:fg = s:fg5
  97. " Background shades
  98. let s:bg1 = ["#17262e", 233]
  99. let s:bg2 = ["#192932", 234]
  100. let s:bg3 = ["#1b2b34", 235]
  101. let s:bg4 = ["#223642", 236]
  102. let s:bg5 = ["#29414f", 237]
  103. let s:bg = s:bg3
  104. " Vivid base colors
  105. let s:red = ["#ec5f67", 167]
  106. let s:orange = ["#f99157", 209]
  107. let s:yellow = ["#fac863", 221]
  108. let s:green = ["#99c794", 108]
  109. let s:aqua = ["#5fb3b3", 73]
  110. let s:blue = ["#6699cc", 68]
  111. let s:lilac = ["#c594c5", 176]
  112. let s:brown = ["#ab7967", 138]
  113. " Vivid dark colors
  114. let s:daqua = ["#4b8a8d", 66]
  115. " Reset
  116. let s:none = ["NONE", "NONE"]
  117. " }}}
  118. " ----- Oceanic Highlight Groups ------------------------------------------- {{{
  119. call s:HL("OcFg", s:fg)
  120. call s:HL("OcFgBold", s:fg, s:none, s:bold)
  121. call s:HL("OcFg1", s:fg1)
  122. call s:HL("OcFg2", s:fg2)
  123. call s:HL("OcFg4", s:fg4)
  124. call s:HL("OcFg4Bold", s:fg4, s:none, s:bold)
  125. call s:HL("OcRed", s:red)
  126. call s:HL("OcRedBold", s:red, s:none, s:bold)
  127. call s:HL("OcOrange", s:orange)
  128. call s:HL("OcOrangeBold", s:orange, s:none, s:bold)
  129. call s:HL("OcYellow", s:yellow)
  130. call s:HL("OcYellowBold", s:yellow, s:none, s:bold)
  131. call s:HL("OcGreen", s:green)
  132. call s:HL("OcGreenBold", s:green, s:none, s:bold)
  133. call s:HL("OcAqua", s:aqua)
  134. call s:HL("OcAquaBold", s:aqua, s:none, s:bold)
  135. call s:HL("OcBlue", s:blue)
  136. call s:HL("OcBlueBold", s:blue, s:none, s:bold)
  137. call s:HL("OcLilac", s:lilac)
  138. call s:HL("OcLilacBold", s:lilac, s:none, s:bold)
  139. call s:HL("OcBrown", s:brown)
  140. call s:HL("OcBrownBold", s:brown, s:none, s:bold)
  141. call s:HL("OcDarkAqua", s:daqua)
  142. call s:HL("OcDarkAquaBold", s:daqua, s:none, s:bold)
  143. " Common Signals
  144. hi! link OcError OcRed
  145. hi! link OcWarning OcYellow
  146. hi! link OcInfo OcBlue
  147. hi! link OcHint OcLilac
  148. " }}}
  149. " ========================================================================== }}}
  150. " ==============================================================================
  151. " ***** Builtin Highlights *****************************************************
  152. " ==============================================================================
  153. " {{{
  154. " ----- Builtin (Editor/UI) ------------------------------------------------ {{{
  155. " See `:help highlight-groups` for reference
  156. if s:config.transparent_bg
  157. call s:HL("Normal", s:fg)
  158. call s:HL("Terminal", s:fg)
  159. call s:HL("EndOfBuffer", s:bg5)
  160. call s:HL("Folded", ["#4d708c", 24])
  161. call s:HL("LineNr", s:fg1)
  162. call s:HL("CursorLineNr", s:fg4)
  163. else
  164. call s:HL("Normal", s:fg, s:bg)
  165. call s:HL("Terminal", s:fg, s:bg)
  166. call s:HL("EndOfBuffer", s:bg5, s:bg)
  167. call s:HL("Folded", ["#4d708c", 24], ["#1e313b", 235])
  168. if s:config.gutter_like_bg
  169. call s:HL("LineNr", s:fg1, s:bg)
  170. call s:HL("CursorLineNr", s:fg4, s:bg)
  171. else
  172. call s:HL("LineNr", s:fg1, s:bg2)
  173. call s:HL("CursorLineNr", s:fg4, s:bg2)
  174. endif
  175. endif
  176. hi! link FoldColumn LineNr
  177. hi! link SignColumn LineNr
  178. call s:HL("ColorColumn", s:none, s:bg2)
  179. hi! link Conceal OcLilac
  180. call s:HL("Cursor", s:fg, s:none, "inverse")
  181. hi! link vCursor Cursor
  182. hi! link iCursor Cursor
  183. hi! link lCursor Cursor
  184. hi! link CursorIM Cursor
  185. call s:HL("CursorLine", s:none, s:bg4)
  186. hi! link CursorColumn CursorLine
  187. call s:HL("DiffAdd", s:none, ["#2d4a46", 22])
  188. call s:HL("DiffChange", s:none, ["#29445a", 23])
  189. call s:HL("DiffDelete", s:none, ["#45353e", 52])
  190. call s:HL("DiffText", s:none, s:bg, "inverse")
  191. hi! link Directory OcBlue
  192. hi! link ErrorMsg OcRed
  193. hi! link WarningMsg OcYellow
  194. call s:HL("ModeMsg", s:fg)
  195. hi! link MoreMsg ModeMsg
  196. call s:HL("Search", s:none, s:bg, "inverse")
  197. call s:HL("MatchParen", s:none, ["#3c5f73", 66])
  198. call s:HL("Whitespace", s:bg5)
  199. hi! link NonText Whitespace
  200. hi! link SpecialKey OcAqua
  201. call s:HL("Pmenu", s:fg, s:bg4)
  202. hi! link PmenuSbar Pmenu
  203. call s:HL("PmenuSel", s:bg, s:blue)
  204. call s:HL("PmenuThumb", s:none, s:bg5)
  205. hi! link WildMenu PmenuSel
  206. hi! link Question OcBlue
  207. call s:HL("SpellBad", s:red, s:none, "undercurl", s:red)
  208. call s:HL("SpellCap", s:yellow, s:none, "undercurl", s:yellow)
  209. call s:HL("SpellLocal", s:blue, s:none, "undercurl", s:blue)
  210. call s:HL("SpellRare", s:lilac, s:none, "undercurl", s:lilac)
  211. call s:HL("StatusLine", s:fg, s:bg1)
  212. hi! link StatusLineTerm StatusLine
  213. call s:HL("StatusLineNC", s:fg1, s:bg1)
  214. hi! link StatusLineTermNC StatusLineNC
  215. call s:HL("TabLine", s:fg2, s:bg1, s:bold)
  216. call s:HL("TabLineFill", s:fg4, s:bg1, s:bold)
  217. call s:HL("TabLineSel", ["#bdc2cc", 250], s:bg, s:bold)
  218. call s:HL("VertSplit", s:bg, s:bg1)
  219. call s:HL("Visual", s:none, ["#2f4c5c", 238])
  220. hi! link VisualNOS Visual
  221. " :checkhealth
  222. hi! link healthError OcRedBold
  223. hi! link healthWarning OcYellowBold
  224. hi! link healthSuccess OcGreenBold
  225. " }}}
  226. " ----- Builtin (Syntax) --------------------------------------------------- {{{
  227. " See `:help group-name` for reference
  228. if s:config.italic_comments
  229. call s:HL("Comment", s:fg3, s:none, "italic")
  230. call s:HL("SpecialComment", ["#a5abb8", 248], s:none, "italic")
  231. call s:HL("Todo", s:fg4, s:bg5, s:bold . "italic")
  232. else
  233. call s:HL("Comment", s:fg3)
  234. call s:HL("SpecialComment", ["#a5abb8", 248])
  235. call s:HL("Todo", s:fg4, s:bg5, s:bold)
  236. endif
  237. call s:HL("Underlined", s:none, s:none, "underline")
  238. hi! link Boolean OcRed
  239. hi! link Character String
  240. hi! link Conditional Statement
  241. hi! link Constant OcAqua
  242. hi! link Debug OcYellow
  243. hi! link Define OcLilac
  244. hi! link Delimiter Special
  245. hi! link Error OcError
  246. hi! link Exception OcAqua
  247. hi! link Float OcOrange
  248. hi! link Function OcBlue
  249. hi! link Identifier OcLilac
  250. hi! link Include OcLilac
  251. hi! link Keyword Statement
  252. hi! link Label Statement
  253. hi! link Macro PreProc
  254. hi! link Number OcOrange
  255. hi! link Operator OcAqua
  256. hi! link PreCondit OcBrown
  257. hi! link PreProc OcAqua
  258. hi! link Repeat Statement
  259. hi! link Special OcAqua
  260. hi! link SpecialChar Special
  261. hi! link Statement OcLilac
  262. hi! link StorageClass OcLilac
  263. hi! link String OcGreen
  264. hi! link Structure Type
  265. hi! link Tag OcRed
  266. hi! link Title OcBlueBold
  267. hi! link Type OcYellow
  268. hi! link Typedef OcAqua
  269. " }}}
  270. " ----- Builtin (nvim-lsp) ------------------------------------------------- {{{
  271. " See `:help lsp-highlight` for reference
  272. if has("nvim")
  273. " Highlights for vim.lsp.buf.document_highlight()
  274. hi! link LspReferenceText Visual
  275. hi! link LspReferenceRead Visual
  276. hi! link LspReferenceWrite Visual
  277. " Other LSP highlights link to these by default (except Underline)
  278. hi! link LspDiagnosticsDefaultError OcError
  279. hi! link LspDiagnosticsDefaultWarning OcWarning
  280. hi! link LspDiagnosticsDefaultInformation OcInfo
  281. hi! link LspDiagnosticsDefaultHint OcHint
  282. " Diagnostic messages placed as virtual text
  283. hi! link LspDiagnosticsVirtualTextError OcError
  284. hi! link LspDiagnosticsVirtualTextWarning OcWarning
  285. hi! link LspDiagnosticsVirtualTextInformation OcInfo
  286. hi! link LspDiagnosticsVirtualTextHint OcHint
  287. " Underline of text causing diagnostic message
  288. call s:HL("LspDiagnosticsUnderlineError", s:red, s:none, "undercurl")
  289. call s:HL("LspDiagnosticsUnderlineWarning", s:yellow, s:none, "undercurl")
  290. call s:HL("LspDiagnosticsUnderlineInformation", s:blue, s:none, "undercurl")
  291. call s:HL("LspDiagnosticsUnderlineHint", s:lilac, s:none, "undercurl")
  292. " Diagnostic messages in floating window
  293. call s:HL("LspDiagnosticsFloatingError", s:fg)
  294. call s:HL("LspDiagnosticsFloatingWarning", s:fg)
  295. call s:HL("LspDiagnosticsFloatingInformation", s:fg)
  296. call s:HL("LspDiagnosticsFloatingHint", s:fg)
  297. " Signs placed in sign column
  298. hi! link LspDiagnosticsSignError OcError
  299. hi! link LspDiagnosticsSignWarning OcWarning
  300. hi! link LspDiagnosticsSignInformation OcInfo
  301. hi! link LspDiagnosticsSignHint OcHint
  302. endif
  303. " }}}
  304. " ========================================================================== }}}
  305. " ==============================================================================
  306. " ***** Plugin Highlights ******************************************************
  307. " ==============================================================================
  308. " {{{
  309. " ----- Plugin (barbar) ---------------------------------------------------- {{{
  310. call s:HL("BufferTabpageFill", s:bg4, s:bg1)
  311. call s:HL("BufferTabpages", s:bg4, s:none, s:bold)
  312. hi! link BufferCurrent TabLineSel
  313. hi! link BufferCurrentMod OcGreenBold
  314. hi! link BufferCurrentSign OcAqua
  315. call s:HL("BufferVisible", s:fg4, s:bg1, s:bold)
  316. call s:HL("BufferVisibleMod", s:green, s:bg1, s:bold)
  317. call s:HL("BufferVisibleSign", s:bg4, s:bg1)
  318. hi! link BufferInactive TabLine
  319. call s:HL("BufferInactiveMod", ["#65876d", 65], s:bg1, s:bold)
  320. hi! link BufferInactiveSign BufferTabpageFill
  321. " }}}
  322. " ----- Plugin (Buftabline) ------------------------------------------------ {{{
  323. hi! link BuftablineActive TabLine
  324. " }}}
  325. " ----- Plugin (coc.vim) --------------------------------------------------- {{{
  326. call s:HL("CocErrorHighlight", s:none, s:none, "undercurl", s:red)
  327. call s:HL("CocHintHighlight", s:none, s:none, "undercurl", s:lilac)
  328. call s:HL("CocInfoHighlight", s:none, s:none, "undercurl", s:blue)
  329. call s:HL("CocWarningHighlight", s:none, s:none, "undercurl", s:yellow)
  330. hi! link CocCodeLens OcFg2
  331. hi! link CocErrorSign OcError
  332. hi! link CocHighlightText Visual
  333. hi! link CocHintSign OcHint
  334. hi! link CocHoverRange Visual
  335. hi! link CocInfoSign OcInfo
  336. hi! link CocWarningSign OcWarning
  337. " }}}
  338. " ----- Plugin (fzf) ------------------------------------------------------- {{{
  339. " NOTE: These groups color the statusline, not the prompt!
  340. call s:HL("fzf1", s:fg4, s:bg2)
  341. hi! link fzf2 fzf1
  342. hi! link fzf3 fzf1
  343. " }}}
  344. " ----- Plugin (NERDTree) -------------------------------------------------- {{{
  345. hi! link NERDTreeCWD OcLilacBold
  346. hi! link NERDTreeClosable OcOrange
  347. hi! link NERDTreeDirSlash OcAqua
  348. hi! link NERDTreeExecFile OcYellow
  349. hi! link NERDTreeLinkFile OcAqua
  350. hi! link NERDTreeLinkTarget OcDarkAqua
  351. hi! link NERDTreeUp OcAqua
  352. " }}}
  353. " ----- Plugin (netrw) ----------------------------------------------------- {{{
  354. hi! link netrwClassify OcAqua
  355. hi! link netrwExe OcYellow
  356. hi! link netrwHidePat netrwList
  357. hi! link netrwLink OcDarkAqua
  358. hi! link netrwList OcLilac
  359. hi! link netrwSymLink OcAqua
  360. hi! link netrwVersion OcGreen
  361. " }}}
  362. " ----- Plugin (nvim-treesitter) ------------------------------------------- {{{
  363. hi! link TSError OcError
  364. hi! link TSField OcFg
  365. hi! link TSNamespace OcAqua
  366. hi! link TSParameter OcFg
  367. hi! link TSPunctBracket OcFg
  368. hi! link TSVariableBuiltin OcRed
  369. " }}}
  370. " ----- Plugin (vim-gitgutter) --------------------------------------------- {{{
  371. hi! link GitGutterAdd OcGreen
  372. hi! link GitGutterChange OcBlue
  373. hi! link GitGutterDelete OcRed
  374. hi! link GitGutterChangeDelete OcOrange
  375. " }}}
  376. " ----- Plugin (vim-signify) ----------------------------------------------- {{{
  377. hi! link SignifyLineAdd DiffAdd
  378. hi! link SignifyLineChange DiffChange
  379. hi! link SignifyLineDelete DiffDelete
  380. hi! link SignifySignAdd OcGreen
  381. hi! link SignifySignChange OcBlue
  382. hi! link SignifySignDelete OcRed
  383. " }}}
  384. " ----- Plugin (vim-startify) ---------------------------------------------- {{{
  385. hi! link StartifyBracket OcFg2
  386. hi! link StartifyFile OcLilacBold
  387. hi! link StartifyFooter Comment
  388. hi! link StartifyHeader OcGreen
  389. hi! link StartifyNumber OcOrange
  390. hi! link StartifyPath OcFg4
  391. hi! link StartifySection OcBlueBold
  392. hi! link StartifySelect OcGreenBold
  393. hi! link StartifySlash OcFg2
  394. " }}}
  395. " ========================================================================== }}}
  396. " ==============================================================================
  397. " ***** Syntax Highlights ******************************************************
  398. " ==============================================================================
  399. " {{{
  400. " ----- Syntax (C/C++) ----------------------------------------------------- {{{
  401. " NOTE: Poorly supported by vim, and the defaults are sufficient for that;
  402. " Revisit once vim ships with better highlighting!
  403. " }}}
  404. " ----- Syntax (CSS) ------------------------------------------------------- {{{
  405. hi! link cssAtKeyword Include
  406. hi! link cssAtRuleLogical OcAqua
  407. hi! link cssAttr OcAqua
  408. hi! link cssBraces OcFg
  409. hi! link cssClassName cssTagName
  410. hi! link cssClassNameDot cssClassName
  411. hi! link cssIdentifier cssTagName
  412. hi! link cssImportant OcLilac
  413. hi! link cssProp OcYellow
  414. hi! link cssPseudoClassId OcBlue
  415. hi! link cssTagName OcRed
  416. " }}}
  417. " ----- Syntax (CSV) ------------------------------------------------------- {{{
  418. hi! link CSVColumnEven OcGreen
  419. hi! link CSVColumnHeaderEven Title
  420. hi! link CSVColumnHeaderOdd CSVColumnHeaderEven
  421. hi! link CSVColumnOdd OcYellow
  422. hi! link CSVDelimiter OcFg
  423. " }}}
  424. " ----- Syntax (diff) ------------------------------------------------------ {{{
  425. hi! link diffAdded OcGreen
  426. hi! link diffFile OcLilacBold
  427. hi! link diffIndexLine OcFg2
  428. hi! link diffLine OcBlue
  429. hi! link diffRemoved OcRed
  430. hi! link diffSubname OcAqua
  431. " }}}
  432. " ----- Syntax (gitcommit) ------------------------------------------------- {{{
  433. hi! link gitcommitBranch OcFgBold
  434. hi! link gitcommitOverflow OcBrown
  435. hi! link gitcommitSelectedFile OcGreenBold
  436. hi! link gitcommitUntrackedFile OcRed
  437. " }}}
  438. " ----- Syntax (gitconfig) ------------------------------------------------- {{{
  439. hi! link gitconfigSection OcBlueBold
  440. hi! link gitconfigVariable OcYellow
  441. hi! link gitconfigDelim gitconfigString
  442. " }}}
  443. " ----- Syntax (gitrebase) ------------------------------------------------- {{{
  444. hi! link gitrebaseBreak OcBrown
  445. hi! link gitrebaseCommit OcLilacBold
  446. hi! link gitrebaseExec OcBlueBold
  447. hi! link gitrebaseFixup gitrebaseSquash
  448. hi! link gitrebaseHash gitrebaseCommit
  449. hi! link gitrebaseReword OcAqua
  450. hi! link gitrebaseSquash OcAqua
  451. " }}}
  452. " ----- Syntax (HTML) ------------------------------------------------------ {{{
  453. hi! link htmlEndTag htmlTag
  454. hi! link htmlH1 OcFg
  455. hi! link htmlH2 htmlH1
  456. hi! link htmlH3 htmlH1
  457. hi! link htmlH4 htmlH1
  458. hi! link htmlH5 htmlH1
  459. hi! link htmlH6 htmlH1
  460. hi! link htmlLink OcFg
  461. hi! link htmlSpecialChar OcLilac
  462. hi! link htmlSpecialTagName htmlTagName
  463. hi! link htmlTag OcAqua
  464. hi! link htmlTagN htmlTagName
  465. hi! link htmlTagName OcRed
  466. hi! link htmlTitle OcFg
  467. " }}}
  468. " ----- Syntax (nftables) -------------------------------------------------- {{{
  469. hi! link nftablesMask OcGreen
  470. hi! link nftablesSet OcAqua
  471. hi! link nftablesSetEntry nftablesSet
  472. " }}}
  473. " ----- Syntax (JavaScript)------------------------------------------------- {{{
  474. hi! link JavaScriptBraces OcFg
  475. hi! link JavaScriptLabel OcAqua
  476. hi! link JavaScriptIdentifier OcRed
  477. " }}}
  478. " ----- Syntax (JSON) ------------------------------------------------------ {{{
  479. hi! link jsonKeyword OcBlue
  480. hi! link jsonQuote String
  481. hi! link jsonKeywordMatch Operator
  482. hi! link jsonNoise Operator
  483. " }}}
  484. " ----- Syntax (Less) ------------------------------------------------------ {{{
  485. hi! link lessAmpersand lessClass
  486. hi! link lessClass cssClassName
  487. hi! link lessClassCall Function
  488. hi! link lessClassChar lessClass
  489. hi! link lessCssAttribute Operator
  490. hi! link lessFunction Function
  491. hi! link lessId cssIdentifier
  492. hi! link lessIdChar lessId
  493. hi! link lessMedia OcLilac
  494. hi! link less OcLilac
  495. " }}}
  496. " ----- Syntax (Markdown) -------------------------------------------------- {{{
  497. call s:HL("markdownItalic", s:lilac, s:none, s:bold . "italic")
  498. hi! link markdownBold OcYellowBold
  499. hi! link markdownCode OcAqua
  500. hi! link markdownH1 OcBlueBold
  501. hi! link markdownH2 markdownH1
  502. hi! link markdownH3 markdownH1
  503. hi! link markdownH4 markdownH1
  504. hi! link markdownH5 markdownH1
  505. hi! link markdownH6 markdownH1
  506. hi! link markdownHeadingDelimiter markdownH1
  507. hi! link markdownHeadingRule markdownH1
  508. hi! link markdownLinkText OcFgBold
  509. hi! link markdownListMarker OcRed
  510. hi! link markdownRule OcAqua
  511. hi! link markdownUrl OcGreen
  512. " }}}
  513. " ----- Syntax (Python) ---------------------------------------------------- {{{
  514. " NOTE: Revisit once vim ships with better highlighting!
  515. hi! link pythonDecorator OcAqua
  516. hi! link pythonDecoratorName pythonDecorator
  517. " }}}
  518. " ----- Syntax (Ruby) ------------------------------------------------------ {{{
  519. " NOTE: Revisit once vim ships with better highlighting!
  520. hi! link rubyStringDelimiter rubyString
  521. " }}}
  522. " ----- Syntax (Rust) ------------------------------------------------------ {{{
  523. " NOTE: Not satisfied with 'rustLifetime' coloring. If green, it wouldn't have
  524. " touched adjacent other greens, but that color should be reserved for actual
  525. " string literals (data).
  526. hi! link rustAttribute OcAqua
  527. hi! link rustAwait rustFuncCall
  528. hi! link rustCommentLineDoc Comment
  529. hi! link rustDerive rustAttribute
  530. hi! link rustDeriveTrait OcGreen
  531. hi! link rustEnumVariant rustType
  532. hi! link rustIdentifier OcYellowBold
  533. hi! link rustLifetime OcRed
  534. hi! link rustMacro rustFuncCall
  535. hi! link rustModPath OcAqua
  536. hi! link rustModPathSep OcDarkAqua
  537. hi! link rustQuestionMark Operator
  538. hi! link rustSelf OcRed
  539. hi! link rustSigil rustOperator
  540. hi! link rustUnsafeKeyword OcAquaBold
  541. " }}}
  542. " ----- Syntax (SCSS) ------------------------------------------------------ {{{
  543. hi! link sassAmpersand sassClass
  544. hi! link sassClass cssClassName
  545. hi! link sassClassChar sassClass
  546. hi! link sassId cssIdentifier
  547. hi! link sassIdChar sassId
  548. hi! link sassMedia cssAtRule
  549. hi! link sassMediaOperators cssAtRuleLogical
  550. hi! link sassMediaQuery cssMediaType
  551. hi! link sassProperty Type
  552. " }}}
  553. " ----- Syntax (Shell) ----------------------------------------------------- {{{
  554. hi! link shCaseBar shOperator
  555. hi! link shCaseLabel OcFg4
  556. hi! link shCommandSub OcFg
  557. hi! link shDeref OcAqua
  558. hi! link shDerefOp shDeref
  559. hi! link shDerefPattern shDeref
  560. hi! link shDerefSimple shDerefVar
  561. hi! link shDerefVar OcBrown
  562. hi! link shDoubleQuote shQuote
  563. hi! link shFunctionFour shFunction
  564. hi! link shFunctionOne shFunction
  565. hi! link shFunctionThree shFunction
  566. hi! link shFunctionTwo shFunction
  567. hi! link shQuote shString
  568. hi! link shSet OcRed
  569. hi! link shSetList shVariable
  570. hi! link shShellVariables OcAqua
  571. hi! link shSnglCase shOperator
  572. hi! link shTestOpr shOperator
  573. hi! link shVarAssign shOperator
  574. hi! link shVariable OcYellow
  575. " }}}
  576. " ----- Syntax (systemd) --------------------------------------------------- {{{
  577. hi! link sdDocURI String
  578. hi! link sdEnvDef OcBrownBold
  579. hi! link sdEnvDefs sdValue
  580. hi! link sdExecArgs OcAqua
  581. hi! link sdExecFile sdFileName
  582. hi! link sdFileName String
  583. hi! link sdHeader Title
  584. hi! link sdKey OcLilac
  585. hi! link sdOtherSignal OcRed
  586. hi! link sdUnitName OcYellowBold
  587. hi! link sdUser OcYellow
  588. hi! link sdValue OcAqua
  589. hi! link sdAutoMountBlock sdMountBlock
  590. hi! link sdInstallBlock sdValue
  591. hi! link sdMountBlock sdValue
  592. hi! link sdPathBlock sdValue
  593. hi! link sdScopeBlock sdValue
  594. hi! link sdServiceBlock sdValue
  595. hi! link sdSliceBlock sdValue
  596. hi! link sdSocketBlock sdValue
  597. hi! link sdSwapBlock sdValue
  598. hi! link sdTimerBlock sdValue
  599. hi! link sdUnitBlock sdValue
  600. " }}}
  601. " ----- Syntax (VimL) ------------------------------------------------------ {{{
  602. hi! link vimBracket OcDarkAqua
  603. hi! link vimCommand OcRed
  604. hi! link vimCommentTitle OcFg4Bold
  605. hi! link vimContinue OcDarkAqua
  606. hi! link vimEnvvar OcBrown
  607. hi! link vimFuncVar vimVar
  608. hi! link vimFunction Function
  609. hi! link vimHiBang vimHighlight
  610. hi! link vimHighlight OcLilac
  611. hi! link vimMap OcLilac
  612. hi! link vimOption vimVar
  613. hi! link vimSetSep Operator
  614. hi! link vimUserFunc vimFunction
  615. hi! link vimVar OcYellow
  616. " }}}
  617. " ----- Syntax (XML) ------------------------------------------------------- {{{
  618. hi! link xmlAttribPunct Operator
  619. hi! link xmlCdata OcFg4
  620. hi! link xmlCdataCdata OcOrange
  621. hi! link xmlCdataEnd xmlCdataStart
  622. hi! link xmlCdataStart xmlTag
  623. hi! link xmlEndTag xmlTag
  624. hi! link xmlEqual Operator
  625. hi! link xmlProcessingDelim OcBlue
  626. hi! link xmlTag OcAqua
  627. hi! link xmlTagN xmlTagName
  628. hi! link xmlTagName OcRed
  629. " }}}
  630. " ----- Syntax (YAML) ------------------------------------------------------ {{{
  631. hi! link yamlAnchor OcRed
  632. hi! link yamlBlockCollectionItemStart OcAqua
  633. hi! link yamlDocumentStart OcAquaBold
  634. hi! link yamlFlowCollection Operator
  635. " }}}
  636. " ========================================================================== }}}
  637. " ==============================================================================
  638. " ***** Syntax Highlights (vim-polyglot) ***************************************
  639. " ==============================================================================
  640. " {{{
  641. " NOTE: Following are language tweaks for vim-polyglot, whose syntax files
  642. " often diverge considerably from those shipping with vim.
  643. if get(g:, "oceanic_for_polyglot", 0)
  644. " ----- Syntax (C/C++ | polyglot) ------------------------------------------ {{{
  645. hi! link cppCast Operator
  646. hi! link cppSTLexception Error
  647. hi! link cppSTLnamespace OcFg
  648. hi! link cppSTLtype Type
  649. " }}}
  650. " ----- Syntax (JavaScript | polyglot) ------------------------------------- {{{
  651. hi! link jsArrowFunction Operator
  652. hi! link jsClassDefinition OcYellowBold
  653. hi! link jsDot Operator
  654. hi! link jsExport Operator
  655. hi! link jsGlobalObjects OcRed
  656. hi! link jsNull OcAqua
  657. hi! link jsObjectKey Type
  658. hi! link jsTemplateBraces Operator
  659. hi! link jsTemplateExpression OcAqua
  660. hi! link jsThis OcRed
  661. " }}}
  662. " ----- Syntax (Markdown | polyglot) --------------------------------------- {{{
  663. hi! link mkdBold markdownBold
  664. hi! link mkdCode markdownCode
  665. hi! link mkdCodeDelimiter mkdCode
  666. hi! link mkdCodeEnd mkdCode
  667. hi! link mkdCodeStart mkdCode
  668. hi! link mkdDelimiter OcFg
  669. hi! link mkdHeading markdownH1
  670. hi! link mkdInlineUrl markdownURL
  671. hi! link mkdItalic markdownItalic
  672. hi! link mkdLink markdownLinkText
  673. hi! link mkdListItem markdownListMarker
  674. hi! link mkdRule markdownRule
  675. hi! link mkdUrl markdownUrl
  676. " NOTE: The polyglot version defines some Markdown elements as HTML. This makes
  677. " little semantic sense and prevents themes from styling them separately. In
  678. " this case, I opted for prettier Markdown at the cost of HTML.
  679. hi! link htmlBold markdownBold
  680. hi! link htmlItalic markdownItalic
  681. hi! link htmlH1 markdownH1
  682. hi! link htmlH2 markdownH1
  683. hi! link htmlH3 markdownH1
  684. hi! link htmlH4 markdownH1
  685. hi! link htmlH5 markdownH1
  686. hi! link htmlH6 markdownH1
  687. " }}}
  688. " ----- Syntax (Python | polyglot) ----------------------------------------- {{{
  689. hi! link pythonDottedName pythonDecorator
  690. hi! link pythonStrFormatting OcBrown
  691. " }}}
  692. " ----- Syntax (SCSS | polyglot) ------------------------------------------- {{{
  693. hi! link scssAmpersand sassAmpersand
  694. hi! link scssNestedProperty sassProperty
  695. hi! link scssSelectorChar sassClassChar
  696. hi! link scssSelectorName sassClass
  697. hi! link scssSemicolon OcFg
  698. " }}}
  699. endif
  700. " ========================================================================== }}}
  701. " vim: sw=2 ts=2 sts=2 tw=80 cc=81 ft=vim fdm=marker fmr={{{,}}}