nord.vim 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789
  1. " Copyright (C) 2016-present Arctic Ice Studio <development@arcticicestudio.com>
  2. " Copyright (C) 2016-present Sven Greb <development@svengreb.de>
  3. " Project: Nord Vim
  4. " Repository: https://github.com/arcticicestudio/nord-vim
  5. " License: MIT
  6. if version > 580
  7. hi clear
  8. if exists("syntax_on")
  9. syntax reset
  10. endif
  11. endif
  12. let g:colors_name = "nord"
  13. let s:nord_vim_version="0.15.0"
  14. set background=dark
  15. let s:nord0_gui = "#2E3440"
  16. let s:nord1_gui = "#3B4252"
  17. let s:nord2_gui = "#434C5E"
  18. let s:nord3_gui = "#4C566A"
  19. let s:nord3_gui_bright = "#616E88"
  20. let s:nord4_gui = "#D8DEE9"
  21. let s:nord5_gui = "#E5E9F0"
  22. let s:nord6_gui = "#ECEFF4"
  23. let s:nord7_gui = "#8FBCBB"
  24. let s:nord8_gui = "#88C0D0"
  25. let s:nord9_gui = "#81A1C1"
  26. let s:nord10_gui = "#5E81AC"
  27. let s:nord11_gui = "#BF616A"
  28. let s:nord12_gui = "#D08770"
  29. let s:nord13_gui = "#EBCB8B"
  30. let s:nord14_gui = "#A3BE8C"
  31. let s:nord15_gui = "#B48EAD"
  32. let s:nord1_term = "0"
  33. let s:nord3_term = "8"
  34. let s:nord5_term = "7"
  35. let s:nord6_term = "15"
  36. let s:nord7_term = "14"
  37. let s:nord8_term = "6"
  38. let s:nord9_term = "4"
  39. let s:nord10_term = "12"
  40. let s:nord11_term = "1"
  41. let s:nord12_term = "11"
  42. let s:nord13_term = "3"
  43. let s:nord14_term = "2"
  44. let s:nord15_term = "5"
  45. let s:nord3_gui_brightened = [
  46. \ s:nord3_gui,
  47. \ "#4e586d",
  48. \ "#505b70",
  49. \ "#525d73",
  50. \ "#556076",
  51. \ "#576279",
  52. \ "#59647c",
  53. \ "#5b677f",
  54. \ "#5d6982",
  55. \ "#5f6c85",
  56. \ "#616e88",
  57. \ "#63718b",
  58. \ "#66738e",
  59. \ "#687591",
  60. \ "#6a7894",
  61. \ "#6d7a96",
  62. \ "#6f7d98",
  63. \ "#72809a",
  64. \ "#75829c",
  65. \ "#78859e",
  66. \ "#7b88a1",
  67. \ ]
  68. if !exists("g:nord_bold")
  69. let g:nord_bold = 1
  70. endif
  71. let s:bold = "bold,"
  72. if g:nord_bold == 0
  73. let s:bold = ""
  74. endif
  75. if !exists("g:nord_italic")
  76. if has("gui_running") || $TERM_ITALICS == "true"
  77. let g:nord_italic = 1
  78. else
  79. let g:nord_italic = 0
  80. endif
  81. endif
  82. let s:italic = "italic,"
  83. if g:nord_italic == 0
  84. let s:italic = ""
  85. endif
  86. let s:underline = "underline,"
  87. if ! get(g:, "nord_underline", 1)
  88. let s:underline = "NONE,"
  89. endif
  90. let s:italicize_comments = ""
  91. if exists("g:nord_italic_comments")
  92. if g:nord_italic_comments == 1
  93. let s:italicize_comments = s:italic
  94. endif
  95. endif
  96. if !exists('g:nord_uniform_status_lines')
  97. let g:nord_uniform_status_lines = 0
  98. endif
  99. function! s:logWarning(msg)
  100. echohl WarningMsg
  101. echomsg 'nord: warning: ' . a:msg
  102. echohl None
  103. endfunction
  104. if exists("g:nord_comment_brightness")
  105. call s:logWarning('Variable g:nord_comment_brightness has been deprecated and will be removed in version 1.0.0!' .
  106. \' The comment color brightness has been increased by 10% by default.' .
  107. \' Please see https://github.com/arcticicestudio/nord-vim/issues/145 for more details.')
  108. let g:nord_comment_brightness = 10
  109. endif
  110. if !exists("g:nord_uniform_diff_background")
  111. let g:nord_uniform_diff_background = 0
  112. endif
  113. if !exists("g:nord_cursor_line_number_background")
  114. let g:nord_cursor_line_number_background = 0
  115. endif
  116. if !exists("g:nord_bold_vertical_split_line")
  117. let g:nord_bold_vertical_split_line = 0
  118. endif
  119. function! s:hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
  120. if a:guifg != ""
  121. exec "hi " . a:group . " guifg=" . a:guifg
  122. endif
  123. if a:guibg != ""
  124. exec "hi " . a:group . " guibg=" . a:guibg
  125. endif
  126. if a:ctermfg != ""
  127. exec "hi " . a:group . " ctermfg=" . a:ctermfg
  128. endif
  129. if a:ctermbg != ""
  130. exec "hi " . a:group . " ctermbg=" . a:ctermbg
  131. endif
  132. if a:attr != ""
  133. exec "hi " . a:group . " gui=" . a:attr . " cterm=" . substitute(a:attr, "undercurl", s:underline, "")
  134. endif
  135. if a:guisp != ""
  136. exec "hi " . a:group . " guisp=" . a:guisp
  137. endif
  138. endfunction
  139. "+---------------+
  140. "+ UI Components +
  141. "+---------------+
  142. "+--- Attributes ---+
  143. call s:hi("Bold", "", "", "", "", s:bold, "")
  144. call s:hi("Italic", "", "", "", "", s:italic, "")
  145. call s:hi("Underline", "", "", "", "", s:underline, "")
  146. "+--- Editor ---+
  147. call s:hi("ColorColumn", "", s:nord1_gui, "NONE", s:nord1_term, "", "")
  148. call s:hi("Cursor", s:nord0_gui, s:nord4_gui, "", "NONE", "", "")
  149. call s:hi("CursorLine", "", s:nord1_gui, "NONE", s:nord1_term, "NONE", "")
  150. call s:hi("Error", s:nord4_gui, s:nord11_gui, "", s:nord11_term, "", "")
  151. call s:hi("iCursor", s:nord0_gui, s:nord4_gui, "", "NONE", "", "")
  152. call s:hi("LineNr", s:nord3_gui, "NONE", s:nord3_term, "NONE", "", "")
  153. call s:hi("MatchParen", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "", "")
  154. call s:hi("NonText", s:nord2_gui, "", s:nord3_term, "", "", "")
  155. call s:hi("Normal", s:nord4_gui, s:nord0_gui, "NONE", "NONE", "", "")
  156. call s:hi("PMenu", s:nord4_gui, s:nord2_gui, "NONE", s:nord1_term, "NONE", "")
  157. call s:hi("PmenuSbar", s:nord4_gui, s:nord2_gui, "NONE", s:nord1_term, "", "")
  158. call s:hi("PMenuSel", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "", "")
  159. call s:hi("PmenuThumb", s:nord8_gui, s:nord3_gui, "NONE", s:nord3_term, "", "")
  160. call s:hi("SpecialKey", s:nord3_gui, "", s:nord3_term, "", "", "")
  161. call s:hi("SpellBad", s:nord11_gui, s:nord0_gui, s:nord11_term, "NONE", "undercurl", s:nord11_gui)
  162. call s:hi("SpellCap", s:nord13_gui, s:nord0_gui, s:nord13_term, "NONE", "undercurl", s:nord13_gui)
  163. call s:hi("SpellLocal", s:nord5_gui, s:nord0_gui, s:nord5_term, "NONE", "undercurl", s:nord5_gui)
  164. call s:hi("SpellRare", s:nord6_gui, s:nord0_gui, s:nord6_term, "NONE", "undercurl", s:nord6_gui)
  165. call s:hi("Visual", "", s:nord2_gui, "", s:nord1_term, "", "")
  166. call s:hi("VisualNOS", "", s:nord2_gui, "", s:nord1_term, "", "")
  167. "+- Neovim Support -+
  168. call s:hi("healthError", s:nord11_gui, s:nord1_gui, s:nord11_term, s:nord1_term, "", "")
  169. call s:hi("healthSuccess", s:nord14_gui, s:nord1_gui, s:nord14_term, s:nord1_term, "", "")
  170. call s:hi("healthWarning", s:nord13_gui, s:nord1_gui, s:nord13_term, s:nord1_term, "", "")
  171. call s:hi("TermCursorNC", "", s:nord1_gui, "", s:nord1_term, "", "")
  172. "+- Vim 8 Terminal Colors -+
  173. if has('terminal')
  174. let g:terminal_ansi_colors = [s:nord1_gui, s:nord11_gui, s:nord14_gui, s:nord13_gui, s:nord9_gui, s:nord15_gui, s:nord8_gui, s:nord5_gui, s:nord3_gui, s:nord11_gui, s:nord14_gui, s:nord13_gui, s:nord9_gui, s:nord15_gui, s:nord7_gui, s:nord6_gui]
  175. endif
  176. "+- Neovim Terminal Colors -+
  177. if has('nvim')
  178. let g:terminal_color_0 = s:nord1_gui
  179. let g:terminal_color_1 = s:nord11_gui
  180. let g:terminal_color_2 = s:nord14_gui
  181. let g:terminal_color_3 = s:nord13_gui
  182. let g:terminal_color_4 = s:nord9_gui
  183. let g:terminal_color_5 = s:nord15_gui
  184. let g:terminal_color_6 = s:nord8_gui
  185. let g:terminal_color_7 = s:nord5_gui
  186. let g:terminal_color_8 = s:nord3_gui
  187. let g:terminal_color_9 = s:nord11_gui
  188. let g:terminal_color_10 = s:nord14_gui
  189. let g:terminal_color_11 = s:nord13_gui
  190. let g:terminal_color_12 = s:nord9_gui
  191. let g:terminal_color_13 = s:nord15_gui
  192. let g:terminal_color_14 = s:nord7_gui
  193. let g:terminal_color_15 = s:nord6_gui
  194. endif
  195. "+--- Gutter ---+
  196. call s:hi("CursorColumn", "", s:nord1_gui, "NONE", s:nord1_term, "", "")
  197. if g:nord_cursor_line_number_background == 0
  198. call s:hi("CursorLineNr", s:nord4_gui, "", "NONE", "", "NONE", "")
  199. else
  200. call s:hi("CursorLineNr", s:nord4_gui, s:nord1_gui, "NONE", s:nord1_term, "NONE", "")
  201. endif
  202. call s:hi("Folded", s:nord3_gui, s:nord1_gui, s:nord3_term, s:nord1_term, s:bold, "")
  203. call s:hi("FoldColumn", s:nord3_gui, s:nord0_gui, s:nord3_term, "NONE", "", "")
  204. call s:hi("SignColumn", s:nord1_gui, s:nord0_gui, s:nord1_term, "NONE", "", "")
  205. "+--- Navigation ---+
  206. call s:hi("Directory", s:nord8_gui, "", s:nord8_term, "NONE", "", "")
  207. "+--- Prompt/Status ---+
  208. call s:hi("EndOfBuffer", s:nord1_gui, "", s:nord1_term, "NONE", "", "")
  209. call s:hi("ErrorMsg", s:nord4_gui, s:nord11_gui, "NONE", s:nord11_term, "", "")
  210. call s:hi("ModeMsg", s:nord4_gui, "", "", "", "", "")
  211. call s:hi("MoreMsg", s:nord8_gui, "", s:nord8_term, "", "", "")
  212. call s:hi("Question", s:nord4_gui, "", "NONE", "", "", "")
  213. if g:nord_uniform_status_lines == 0
  214. call s:hi("StatusLine", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "NONE", "")
  215. call s:hi("StatusLineNC", s:nord4_gui, s:nord1_gui, "NONE", s:nord1_term, "NONE", "")
  216. call s:hi("StatusLineTerm", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "NONE", "")
  217. call s:hi("StatusLineTermNC", s:nord4_gui, s:nord1_gui, "NONE", s:nord1_term, "NONE", "")
  218. else
  219. call s:hi("StatusLine", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "NONE", "")
  220. call s:hi("StatusLineNC", s:nord4_gui, s:nord3_gui, "NONE", s:nord3_term, "NONE", "")
  221. call s:hi("StatusLineTerm", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "NONE", "")
  222. call s:hi("StatusLineTermNC", s:nord4_gui, s:nord3_gui, "NONE", s:nord3_term, "NONE", "")
  223. endif
  224. call s:hi("WarningMsg", s:nord0_gui, s:nord13_gui, s:nord1_term, s:nord13_term, "", "")
  225. call s:hi("WildMenu", s:nord8_gui, s:nord1_gui, s:nord8_term, s:nord1_term, "", "")
  226. "+--- Search ---+
  227. call s:hi("IncSearch", s:nord6_gui, s:nord10_gui, s:nord6_term, s:nord10_term, s:underline, "")
  228. call s:hi("Search", s:nord1_gui, s:nord8_gui, s:nord1_term, s:nord8_term, "NONE", "")
  229. "+--- Tabs ---+
  230. call s:hi("TabLine", s:nord4_gui, s:nord1_gui, "NONE", s:nord1_term, "NONE", "")
  231. call s:hi("TabLineFill", s:nord4_gui, s:nord1_gui, "NONE", s:nord1_term, "NONE", "")
  232. call s:hi("TabLineSel", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "NONE", "")
  233. "+--- Window ---+
  234. call s:hi("Title", s:nord4_gui, "", "NONE", "", "NONE", "")
  235. if g:nord_bold_vertical_split_line == 0
  236. call s:hi("VertSplit", s:nord2_gui, s:nord0_gui, s:nord3_term, "NONE", "NONE", "")
  237. else
  238. call s:hi("VertSplit", s:nord2_gui, s:nord1_gui, s:nord3_term, s:nord1_term, "NONE", "")
  239. endif
  240. "+----------------------+
  241. "+ Language Base Groups +
  242. "+----------------------+
  243. call s:hi("Boolean", s:nord9_gui, "", s:nord9_term, "", "", "")
  244. call s:hi("Character", s:nord14_gui, "", s:nord14_term, "", "", "")
  245. call s:hi("Comment", s:nord3_gui_bright, "", s:nord3_term, "", s:italicize_comments, "")
  246. call s:hi("Conditional", s:nord9_gui, "", s:nord9_term, "", "", "")
  247. call s:hi("Constant", s:nord4_gui, "", "NONE", "", "", "")
  248. call s:hi("Define", s:nord9_gui, "", s:nord9_term, "", "", "")
  249. call s:hi("Delimiter", s:nord6_gui, "", s:nord6_term, "", "", "")
  250. call s:hi("Exception", s:nord9_gui, "", s:nord9_term, "", "", "")
  251. call s:hi("Float", s:nord15_gui, "", s:nord15_term, "", "", "")
  252. call s:hi("Function", s:nord8_gui, "", s:nord8_term, "", "", "")
  253. call s:hi("Identifier", s:nord4_gui, "", "NONE", "", "NONE", "")
  254. call s:hi("Include", s:nord9_gui, "", s:nord9_term, "", "", "")
  255. call s:hi("Keyword", s:nord9_gui, "", s:nord9_term, "", "", "")
  256. call s:hi("Label", s:nord9_gui, "", s:nord9_term, "", "", "")
  257. call s:hi("Number", s:nord15_gui, "", s:nord15_term, "", "", "")
  258. call s:hi("Operator", s:nord9_gui, "", s:nord9_term, "", "NONE", "")
  259. call s:hi("PreProc", s:nord9_gui, "", s:nord9_term, "", "NONE", "")
  260. call s:hi("Repeat", s:nord9_gui, "", s:nord9_term, "", "", "")
  261. call s:hi("Special", s:nord4_gui, "", "NONE", "", "", "")
  262. call s:hi("SpecialChar", s:nord13_gui, "", s:nord13_term, "", "", "")
  263. call s:hi("SpecialComment", s:nord8_gui, "", s:nord8_term, "", s:italicize_comments, "")
  264. call s:hi("Statement", s:nord9_gui, "", s:nord9_term, "", "", "")
  265. call s:hi("StorageClass", s:nord9_gui, "", s:nord9_term, "", "", "")
  266. call s:hi("String", s:nord14_gui, "", s:nord14_term, "", "", "")
  267. call s:hi("Structure", s:nord9_gui, "", s:nord9_term, "", "", "")
  268. call s:hi("Tag", s:nord4_gui, "", "", "", "", "")
  269. call s:hi("Todo", s:nord13_gui, "NONE", s:nord13_term, "NONE", "", "")
  270. call s:hi("Type", s:nord9_gui, "", s:nord9_term, "", "NONE", "")
  271. call s:hi("Typedef", s:nord9_gui, "", s:nord9_term, "", "", "")
  272. hi! link Macro Define
  273. hi! link PreCondit PreProc
  274. "+-----------+
  275. "+ Languages +
  276. "+-----------+
  277. call s:hi("asciidocAttributeEntry", s:nord10_gui, "", s:nord10_term, "", "", "")
  278. call s:hi("asciidocAttributeList", s:nord10_gui, "", s:nord10_term, "", "", "")
  279. call s:hi("asciidocAttributeRef", s:nord10_gui, "", s:nord10_term, "", "", "")
  280. call s:hi("asciidocHLabel", s:nord9_gui, "", s:nord9_term, "", "", "")
  281. call s:hi("asciidocListingBlock", s:nord7_gui, "", s:nord7_term, "", "", "")
  282. call s:hi("asciidocMacroAttributes", s:nord8_gui, "", s:nord8_term, "", "", "")
  283. call s:hi("asciidocOneLineTitle", s:nord8_gui, "", s:nord8_term, "", "", "")
  284. call s:hi("asciidocPassthroughBlock", s:nord9_gui, "", s:nord9_term, "", "", "")
  285. call s:hi("asciidocQuotedMonospaced", s:nord7_gui, "", s:nord7_term, "", "", "")
  286. call s:hi("asciidocTriplePlusPassthrough", s:nord7_gui, "", s:nord7_term, "", "", "")
  287. hi! link asciidocAdmonition Keyword
  288. hi! link asciidocAttributeRef markdownH1
  289. hi! link asciidocBackslash Keyword
  290. hi! link asciidocMacro Keyword
  291. hi! link asciidocQuotedBold Bold
  292. hi! link asciidocQuotedEmphasized Italic
  293. hi! link asciidocQuotedMonospaced2 asciidocQuotedMonospaced
  294. hi! link asciidocQuotedUnconstrainedBold asciidocQuotedBold
  295. hi! link asciidocQuotedUnconstrainedEmphasized asciidocQuotedEmphasized
  296. hi! link asciidocURL markdownLinkText
  297. call s:hi("awkCharClass", s:nord7_gui, "", s:nord7_term, "", "", "")
  298. call s:hi("awkPatterns", s:nord9_gui, "", s:nord9_term, "", s:bold, "")
  299. hi! link awkArrayElement Identifier
  300. hi! link awkBoolLogic Keyword
  301. hi! link awkBrktRegExp SpecialChar
  302. hi! link awkComma Delimiter
  303. hi! link awkExpression Keyword
  304. hi! link awkFieldVars Identifier
  305. hi! link awkLineSkip Keyword
  306. hi! link awkOperator Operator
  307. hi! link awkRegExp SpecialChar
  308. hi! link awkSearch Keyword
  309. hi! link awkSemicolon Delimiter
  310. hi! link awkSpecialCharacter SpecialChar
  311. hi! link awkSpecialPrintf SpecialChar
  312. hi! link awkVariables Identifier
  313. call s:hi("cIncluded", s:nord7_gui, "", s:nord7_term, "", "", "")
  314. hi! link cOperator Operator
  315. hi! link cPreCondit PreCondit
  316. call s:hi("cmakeGeneratorExpression", s:nord10_gui, "", s:nord10_term, "", "", "")
  317. hi! link csPreCondit PreCondit
  318. hi! link csType Type
  319. hi! link csXmlTag SpecialComment
  320. call s:hi("cssAttributeSelector", s:nord7_gui, "", s:nord7_term, "", "", "")
  321. call s:hi("cssDefinition", s:nord7_gui, "", s:nord7_term, "", "NONE", "")
  322. call s:hi("cssIdentifier", s:nord7_gui, "", s:nord7_term, "", s:underline, "")
  323. call s:hi("cssStringQ", s:nord7_gui, "", s:nord7_term, "", "", "")
  324. hi! link cssAttr Keyword
  325. hi! link cssBraces Delimiter
  326. hi! link cssClassName cssDefinition
  327. hi! link cssColor Number
  328. hi! link cssProp cssDefinition
  329. hi! link cssPseudoClass cssDefinition
  330. hi! link cssPseudoClassId cssPseudoClass
  331. hi! link cssVendor Keyword
  332. call s:hi("dosiniHeader", s:nord8_gui, "", s:nord8_term, "", "", "")
  333. hi! link dosiniLabel Type
  334. call s:hi("dtBooleanKey", s:nord7_gui, "", s:nord7_term, "", "", "")
  335. call s:hi("dtExecKey", s:nord7_gui, "", s:nord7_term, "", "", "")
  336. call s:hi("dtLocaleKey", s:nord7_gui, "", s:nord7_term, "", "", "")
  337. call s:hi("dtNumericKey", s:nord7_gui, "", s:nord7_term, "", "", "")
  338. call s:hi("dtTypeKey", s:nord7_gui, "", s:nord7_term, "", "", "")
  339. hi! link dtDelim Delimiter
  340. hi! link dtLocaleValue Keyword
  341. hi! link dtTypeValue Keyword
  342. if g:nord_uniform_diff_background == 0
  343. call s:hi("DiffAdd", s:nord14_gui, s:nord0_gui, s:nord14_term, "NONE", "inverse", "")
  344. call s:hi("DiffChange", s:nord13_gui, s:nord0_gui, s:nord13_term, "NONE", "inverse", "")
  345. call s:hi("DiffDelete", s:nord11_gui, s:nord0_gui, s:nord11_term, "NONE", "inverse", "")
  346. call s:hi("DiffText", s:nord9_gui, s:nord0_gui, s:nord9_term, "NONE", "inverse", "")
  347. else
  348. call s:hi("DiffAdd", s:nord14_gui, s:nord1_gui, s:nord14_term, s:nord1_term, "", "")
  349. call s:hi("DiffChange", s:nord13_gui, s:nord1_gui, s:nord13_term, s:nord1_term, "", "")
  350. call s:hi("DiffDelete", s:nord11_gui, s:nord1_gui, s:nord11_term, s:nord1_term, "", "")
  351. call s:hi("DiffText", s:nord9_gui, s:nord1_gui, s:nord9_term, s:nord1_term, "", "")
  352. endif
  353. " Legacy groups for official git.vim and diff.vim syntax
  354. hi! link diffAdded DiffAdd
  355. hi! link diffChanged DiffChange
  356. hi! link diffRemoved DiffDelete
  357. call s:hi("gitconfigVariable", s:nord7_gui, "", s:nord7_term, "", "", "")
  358. call s:hi("goBuiltins", s:nord7_gui, "", s:nord7_term, "", "", "")
  359. hi! link goConstants Keyword
  360. call s:hi("helpBar", s:nord3_gui, "", s:nord3_term, "", "", "")
  361. call s:hi("helpHyperTextJump", s:nord8_gui, "", s:nord8_term, "", s:underline, "")
  362. call s:hi("htmlArg", s:nord7_gui, "", s:nord7_term, "", "", "")
  363. call s:hi("htmlLink", s:nord4_gui, "", "", "", "NONE", "NONE")
  364. hi! link htmlBold Bold
  365. hi! link htmlEndTag htmlTag
  366. hi! link htmlItalic Italic
  367. hi! link htmlH1 markdownH1
  368. hi! link htmlH2 markdownH1
  369. hi! link htmlH3 markdownH1
  370. hi! link htmlH4 markdownH1
  371. hi! link htmlH5 markdownH1
  372. hi! link htmlH6 markdownH1
  373. hi! link htmlSpecialChar SpecialChar
  374. hi! link htmlTag Keyword
  375. hi! link htmlTagN htmlTag
  376. call s:hi("javaDocTags", s:nord7_gui, "", s:nord7_term, "", "", "")
  377. hi! link javaCommentTitle Comment
  378. hi! link javaScriptBraces Delimiter
  379. hi! link javaScriptIdentifier Keyword
  380. hi! link javaScriptNumber Number
  381. call s:hi("jsonKeyword", s:nord7_gui, "", s:nord7_term, "", "", "")
  382. call s:hi("lessClass", s:nord7_gui, "", s:nord7_term, "", "", "")
  383. hi! link lessAmpersand Keyword
  384. hi! link lessCssAttribute Delimiter
  385. hi! link lessFunction Function
  386. hi! link cssSelectorOp Keyword
  387. hi! link lispAtomBarSymbol SpecialChar
  388. hi! link lispAtomList SpecialChar
  389. hi! link lispAtomMark Keyword
  390. hi! link lispBarSymbol SpecialChar
  391. hi! link lispFunc Function
  392. hi! link luaFunc Function
  393. call s:hi("markdownBlockquote", s:nord7_gui, "", s:nord7_term, "", "", "")
  394. call s:hi("markdownCode", s:nord7_gui, "", s:nord7_term, "", "", "")
  395. call s:hi("markdownCodeDelimiter", s:nord7_gui, "", s:nord7_term, "", "", "")
  396. call s:hi("markdownFootnote", s:nord7_gui, "", s:nord7_term, "", "", "")
  397. call s:hi("markdownId", s:nord7_gui, "", s:nord7_term, "", "", "")
  398. call s:hi("markdownIdDeclaration", s:nord7_gui, "", s:nord7_term, "", "", "")
  399. call s:hi("markdownH1", s:nord8_gui, "", s:nord8_term, "", "", "")
  400. call s:hi("markdownLinkText", s:nord8_gui, "", s:nord8_term, "", "", "")
  401. call s:hi("markdownUrl", s:nord4_gui, "", "NONE", "", "NONE", "")
  402. hi! link markdownBold Bold
  403. hi! link markdownBoldDelimiter Keyword
  404. hi! link markdownFootnoteDefinition markdownFootnote
  405. hi! link markdownH2 markdownH1
  406. hi! link markdownH3 markdownH1
  407. hi! link markdownH4 markdownH1
  408. hi! link markdownH5 markdownH1
  409. hi! link markdownH6 markdownH1
  410. hi! link markdownIdDelimiter Keyword
  411. hi! link markdownItalic Italic
  412. hi! link markdownItalicDelimiter Keyword
  413. hi! link markdownLinkDelimiter Keyword
  414. hi! link markdownLinkTextDelimiter Keyword
  415. hi! link markdownListMarker Keyword
  416. hi! link markdownRule Keyword
  417. hi! link markdownHeadingDelimiter Keyword
  418. call s:hi("perlPackageDecl", s:nord7_gui, "", s:nord7_term, "", "", "")
  419. call s:hi("phpClasses", s:nord7_gui, "", s:nord7_term, "", "", "")
  420. call s:hi("phpClass", s:nord7_gui, "", s:nord7_term, "", "", "")
  421. call s:hi("phpDocTags", s:nord7_gui, "", s:nord7_term, "", "", "")
  422. hi! link phpDocCustomTags phpDocTags
  423. hi! link phpMemberSelector Keyword
  424. hi! link phpMethod Function
  425. hi! link phpFunction Function
  426. call s:hi("podCmdText", s:nord7_gui, "", s:nord7_term, "", "", "")
  427. call s:hi("podVerbatimLine", s:nord4_gui, "", "NONE", "", "", "")
  428. hi! link podFormat Keyword
  429. hi! link pythonBuiltin Type
  430. hi! link pythonEscape SpecialChar
  431. call s:hi("rubyConstant", s:nord7_gui, "", s:nord7_term, "", "", "")
  432. call s:hi("rubySymbol", s:nord6_gui, "", s:nord6_term, "", s:bold, "")
  433. hi! link rubyAttribute Identifier
  434. hi! link rubyBlockParameterList Operator
  435. hi! link rubyInterpolationDelimiter Keyword
  436. hi! link rubyKeywordAsMethod Function
  437. hi! link rubyLocalVariableOrMethod Function
  438. hi! link rubyPseudoVariable Keyword
  439. hi! link rubyRegexp SpecialChar
  440. call s:hi("rustAttribute", s:nord10_gui, "", s:nord10_term, "", "", "")
  441. call s:hi("rustEnum", s:nord7_gui, "", s:nord7_term, "", s:bold, "")
  442. call s:hi("rustMacro", s:nord8_gui, "", s:nord8_term, "", s:bold, "")
  443. call s:hi("rustModPath", s:nord7_gui, "", s:nord7_term, "", "", "")
  444. call s:hi("rustPanic", s:nord9_gui, "", s:nord9_term, "", s:bold, "")
  445. call s:hi("rustTrait", s:nord7_gui, "", s:nord7_term, "", s:italic, "")
  446. hi! link rustCommentLineDoc Comment
  447. hi! link rustDerive rustAttribute
  448. hi! link rustEnumVariant rustEnum
  449. hi! link rustEscape SpecialChar
  450. hi! link rustQuestionMark Keyword
  451. call s:hi("sassClass", s:nord7_gui, "", s:nord7_term, "", "", "")
  452. call s:hi("sassId", s:nord7_gui, "", s:nord7_term, "", s:underline, "")
  453. hi! link sassAmpersand Keyword
  454. hi! link sassClassChar Delimiter
  455. hi! link sassControl Keyword
  456. hi! link sassControlLine Keyword
  457. hi! link sassExtend Keyword
  458. hi! link sassFor Keyword
  459. hi! link sassFunctionDecl Keyword
  460. hi! link sassFunctionName Function
  461. hi! link sassidChar sassId
  462. hi! link sassInclude SpecialChar
  463. hi! link sassMixinName Function
  464. hi! link sassMixing SpecialChar
  465. hi! link sassReturn Keyword
  466. hi! link shCmdParenRegion Delimiter
  467. hi! link shCmdSubRegion Delimiter
  468. hi! link shDerefSimple Identifier
  469. hi! link shDerefVar Identifier
  470. hi! link sqlKeyword Keyword
  471. hi! link sqlSpecial Keyword
  472. call s:hi("vimAugroup", s:nord7_gui, "", s:nord7_term, "", "", "")
  473. call s:hi("vimMapRhs", s:nord7_gui, "", s:nord7_term, "", "", "")
  474. call s:hi("vimNotation", s:nord7_gui, "", s:nord7_term, "", "", "")
  475. hi! link vimFunc Function
  476. hi! link vimFunction Function
  477. hi! link vimUserFunc Function
  478. call s:hi("xmlAttrib", s:nord7_gui, "", s:nord7_term, "", "", "")
  479. call s:hi("xmlCdataStart", s:nord3_gui_bright, "", s:nord3_term, "", s:bold, "")
  480. call s:hi("xmlNamespace", s:nord7_gui, "", s:nord7_term, "", "", "")
  481. hi! link xmlAttribPunct Delimiter
  482. hi! link xmlCdata Comment
  483. hi! link xmlCdataCdata xmlCdataStart
  484. hi! link xmlCdataEnd xmlCdataStart
  485. hi! link xmlEndTag xmlTagName
  486. hi! link xmlProcessingDelim Keyword
  487. hi! link xmlTagName Keyword
  488. call s:hi("yamlBlockMappingKey", s:nord7_gui, "", s:nord7_term, "", "", "")
  489. hi! link yamlBool Keyword
  490. hi! link yamlDocumentStart Keyword
  491. "+----------------+
  492. "+ Plugin Support +
  493. "+----------------+
  494. "+--- UI ---+
  495. " ALE
  496. " > w0rp/ale
  497. call s:hi("ALEWarningSign", s:nord13_gui, "", s:nord13_term, "", "", "")
  498. call s:hi("ALEErrorSign" , s:nord11_gui, "", s:nord11_term, "", "", "")
  499. call s:hi("ALEWarning" , s:nord13_gui, "", s:nord13_term, "", "undercurl", "")
  500. call s:hi("ALEError" , s:nord11_gui, "", s:nord11_term, "", "undercurl", "")
  501. " Coc
  502. " > neoclide/coc
  503. call s:hi("CocWarningHighlight" , s:nord13_gui, "", s:nord13_term, "", "undercurl", "")
  504. call s:hi("CocErrorHighlight" , s:nord11_gui, "", s:nord11_term, "", "undercurl", "")
  505. call s:hi("CocWarningSign", s:nord13_gui, "", s:nord13_term, "", "", "")
  506. call s:hi("CocErrorSign" , s:nord11_gui, "", s:nord11_term, "", "", "")
  507. call s:hi("CocInfoSign" , s:nord8_gui, "", s:nord8_term, "", "", "")
  508. call s:hi("CocHintSign" , s:nord10_gui, "", s:nord10_term, "", "", "")
  509. " Nvim LSP
  510. " > neovim/nvim-lsp
  511. call s:hi("LSPDiagnosticsWarning", s:nord13_gui, "", s:nord13_term, "", "", "")
  512. call s:hi("LSPDiagnosticsError" , s:nord11_gui, "", s:nord11_term, "", "", "")
  513. call s:hi("LSPDiagnosticsInformation" , s:nord8_gui, "", s:nord8_term, "", "", "")
  514. call s:hi("LSPDiagnosticsHint" , s:nord10_gui, "", s:nord10_term, "", "", "")
  515. " GitGutter
  516. " > airblade/vim-gitgutter
  517. call s:hi("GitGutterAdd", s:nord14_gui, "", s:nord14_term, "", "", "")
  518. call s:hi("GitGutterChange", s:nord13_gui, "", s:nord13_term, "", "", "")
  519. call s:hi("GitGutterChangeDelete", s:nord11_gui, "", s:nord11_term, "", "", "")
  520. call s:hi("GitGutterDelete", s:nord11_gui, "", s:nord11_term, "", "", "")
  521. " Signify
  522. " > mhinz/vim-signify
  523. call s:hi("SignifySignAdd", s:nord14_gui, "", s:nord14_term, "", "", "")
  524. call s:hi("SignifySignChange", s:nord13_gui, "", s:nord13_term, "", "", "")
  525. call s:hi("SignifySignChangeDelete", s:nord11_gui, "", s:nord11_term, "", "", "")
  526. call s:hi("SignifySignDelete", s:nord11_gui, "", s:nord11_term, "", "", "")
  527. " fugitive.vim
  528. " > tpope/vim-fugitive
  529. call s:hi("gitcommitDiscardedFile", s:nord11_gui, "", s:nord11_term, "", "", "")
  530. call s:hi("gitcommitUntrackedFile", s:nord11_gui, "", s:nord11_term, "", "", "")
  531. call s:hi("gitcommitSelectedFile", s:nord14_gui, "", s:nord14_term, "", "", "")
  532. " davidhalter/jedi-vim
  533. call s:hi("jediFunction", s:nord4_gui, s:nord3_gui, "", s:nord3_term, "", "")
  534. call s:hi("jediFat", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, s:underline.s:bold, "")
  535. " NERDTree
  536. " > scrooloose/nerdtree
  537. call s:hi("NERDTreeExecFile", s:nord7_gui, "", s:nord7_term, "", "", "")
  538. hi! link NERDTreeDirSlash Keyword
  539. hi! link NERDTreeHelp Comment
  540. " CtrlP
  541. " > ctrlpvim/ctrlp.vim
  542. hi! link CtrlPMatch Keyword
  543. hi! link CtrlPBufferHid Normal
  544. " vim-clap
  545. " > liuchengxu/vim-clap
  546. call s:hi("ClapDir", s:nord4_gui, "", "", "", "", "")
  547. call s:hi("ClapDisplay", s:nord4_gui, s:nord1_gui, "", s:nord1_term, "", "")
  548. call s:hi("ClapFile", s:nord4_gui, "", "", "NONE", "", "")
  549. call s:hi("ClapMatches", s:nord8_gui, "", s:nord8_term, "", "", "")
  550. call s:hi("ClapNoMatchesFound", s:nord13_gui, "", s:nord13_term, "", "", "")
  551. call s:hi("ClapSelected", s:nord7_gui, "", s:nord7_term, "", s:bold, "")
  552. call s:hi("ClapSelectedSign", s:nord9_gui, "", s:nord9_term, "", "", "")
  553. let s:clap_matches = [
  554. \ [s:nord8_gui, s:nord8_term] ,
  555. \ [s:nord9_gui, s:nord9_term] ,
  556. \ [s:nord10_gui, s:nord10_term] ,
  557. \ ]
  558. for s:nord_clap_match_i in range(1,12)
  559. let clap_match_color = s:clap_matches[s:nord_clap_match_i % len(s:clap_matches) - 1]
  560. call s:hi("ClapMatches" . s:nord_clap_match_i, clap_match_color[0], "", clap_match_color[1], "", "", "")
  561. call s:hi("ClapFuzzyMatches" . s:nord_clap_match_i, clap_match_color[0], "", clap_match_color[1], "", "", "")
  562. endfor
  563. unlet s:nord_clap_match_i
  564. hi! link ClapCurrentSelection PmenuSel
  565. hi! link ClapCurrentSelectionSign ClapSelectedSign
  566. hi! link ClapInput Pmenu
  567. hi! link ClapPreview Pmenu
  568. hi! link ClapProviderAbout ClapDisplay
  569. hi! link ClapProviderColon Type
  570. hi! link ClapProviderId Type
  571. " vim-indent-guides
  572. " > nathanaelkane/vim-indent-guides
  573. call s:hi("IndentGuidesEven", "", s:nord1_gui, "", s:nord1_term, "", "")
  574. call s:hi("IndentGuidesOdd", "", s:nord2_gui, "", s:nord3_term, "", "")
  575. " vim-plug
  576. " > junegunn/vim-plug
  577. call s:hi("plugDeleted", s:nord11_gui, "", "", s:nord11_term, "", "")
  578. " vim-signature
  579. " > kshenoy/vim-signature
  580. call s:hi("SignatureMarkText", s:nord8_gui, "", s:nord8_term, "", "", "")
  581. " vim-startify
  582. " > mhinz/vim-startify
  583. call s:hi("StartifyFile", s:nord6_gui, "", s:nord6_term, "", "", "")
  584. call s:hi("StartifyFooter", s:nord7_gui, "", s:nord7_term, "", "", "")
  585. call s:hi("StartifyHeader", s:nord8_gui, "", s:nord8_term, "", "", "")
  586. call s:hi("StartifyNumber", s:nord7_gui, "", s:nord7_term, "", "", "")
  587. call s:hi("StartifyPath", s:nord8_gui, "", s:nord8_term, "", "", "")
  588. hi! link StartifyBracket Delimiter
  589. hi! link StartifySlash Normal
  590. hi! link StartifySpecial Comment
  591. "+--- Languages ---+
  592. " Haskell
  593. " > neovimhaskell/haskell-vim
  594. call s:hi("haskellPreProc", s:nord10_gui, "", s:nord10_term, "", "", "")
  595. call s:hi("haskellType", s:nord7_gui, "", s:nord7_term, "", "", "")
  596. hi! link haskellPragma haskellPreProc
  597. " JavaScript
  598. " > pangloss/vim-javascript
  599. call s:hi("jsGlobalNodeObjects", s:nord8_gui, "", s:nord8_term, "", s:italic, "")
  600. hi! link jsBrackets Delimiter
  601. hi! link jsFuncCall Function
  602. hi! link jsFuncParens Delimiter
  603. hi! link jsThis Keyword
  604. hi! link jsNoise Delimiter
  605. hi! link jsPrototype Keyword
  606. hi! link jsRegexpString SpecialChar
  607. " TypeScript
  608. " > HerringtonDarkholme/yats.vim
  609. call s:hi("typescriptBOMWindowMethod", s:nord8_gui, "", s:nord8_term, "", s:italic, "")
  610. call s:hi("typescriptClassName", s:nord7_gui, "", s:nord7_term, "", "", "")
  611. call s:hi("typescriptDecorator", s:nord12_gui, "", s:nord12_term, "", "", "")
  612. call s:hi("typescriptInterfaceName", s:nord7_gui, "", s:nord7_term, "", s:bold, "")
  613. call s:hi("typescriptRegexpString", s:nord13_gui, "", s:nord13_term, "", "", "")
  614. " TypeScript JSX
  615. call s:hi("tsxAttrib", s:nord7_gui, "", s:nord7_term, "", "", "")
  616. hi! link typescriptOperator Operator
  617. hi! link typescriptBinaryOp Operator
  618. hi! link typescriptAssign Operator
  619. hi! link typescriptMember Identifier
  620. hi! link typescriptDOMStorageMethod Identifier
  621. hi! link typescriptArrowFuncArg Identifier
  622. hi! link typescriptGlobal typescriptClassName
  623. hi! link typescriptBOMWindowProp Function
  624. hi! link typescriptArrowFuncDef Function
  625. hi! link typescriptAliasDeclaration Function
  626. hi! link typescriptPredefinedType Type
  627. hi! link typescriptTypeReference typescriptClassName
  628. hi! link typescriptTypeAnnotation Structure
  629. hi! link typescriptDocNamedParamType SpecialComment
  630. hi! link typescriptDocNotation Keyword
  631. hi! link typescriptDocTags Keyword
  632. hi! link typescriptImport Keyword
  633. hi! link typescriptExport Keyword
  634. hi! link typescriptTry Keyword
  635. hi! link typescriptVariable Keyword
  636. hi! link typescriptBraces Normal
  637. hi! link typescriptObjectLabel Normal
  638. hi! link typescriptCall Normal
  639. hi! link typescriptClassHeritage typescriptClassName
  640. hi! link typescriptFuncTypeArrow Structure
  641. hi! link typescriptMemberOptionality Structure
  642. hi! link typescriptNodeGlobal typescriptGlobal
  643. hi! link typescriptTypeBrackets Structure
  644. hi! link tsxEqual Operator
  645. hi! link tsxIntrinsicTagName htmlTag
  646. hi! link tsxTagName tsxIntrinsicTagName
  647. " Markdown
  648. " > plasticboy/vim-markdown
  649. call s:hi("mkdCode", s:nord7_gui, "", s:nord7_term, "", "", "")
  650. call s:hi("mkdFootnote", s:nord8_gui, "", s:nord8_term, "", "", "")
  651. call s:hi("mkdRule", s:nord10_gui, "", s:nord10_term, "", "", "")
  652. call s:hi("mkdLineBreak", s:nord9_gui, "", s:nord9_term, "", "", "")
  653. hi! link mkdBold Bold
  654. hi! link mkdItalic Italic
  655. hi! link mkdString Keyword
  656. hi! link mkdCodeStart mkdCode
  657. hi! link mkdCodeEnd mkdCode
  658. hi! link mkdBlockquote Comment
  659. hi! link mkdListItem Keyword
  660. hi! link mkdListItemLine Normal
  661. hi! link mkdFootnotes mkdFootnote
  662. hi! link mkdLink markdownLinkText
  663. hi! link mkdURL markdownUrl
  664. hi! link mkdInlineURL mkdURL
  665. hi! link mkdID Identifier
  666. hi! link mkdLinkDef mkdLink
  667. hi! link mkdLinkDefTarget mkdURL
  668. hi! link mkdLinkTitle mkdInlineURL
  669. hi! link mkdDelimiter Keyword
  670. " Vimwiki
  671. " > vimwiki/vimwiki
  672. if !exists("g:vimwiki_hl_headers") || g:vimwiki_hl_headers == 0
  673. for s:i in range(1,6)
  674. call s:hi("VimwikiHeader".s:i, s:nord8_gui, "", s:nord8_term, "", s:bold, "")
  675. endfor
  676. else
  677. let s:vimwiki_hcolor_guifg = [s:nord7_gui, s:nord8_gui, s:nord9_gui, s:nord10_gui, s:nord14_gui, s:nord15_gui]
  678. let s:vimwiki_hcolor_ctermfg = [s:nord7_term, s:nord8_term, s:nord9_term, s:nord10_term, s:nord14_term, s:nord15_term]
  679. for s:i in range(1,6)
  680. call s:hi("VimwikiHeader".s:i, s:vimwiki_hcolor_guifg[s:i-1] , "", s:vimwiki_hcolor_ctermfg[s:i-1], "", s:bold, "")
  681. endfor
  682. endif
  683. call s:hi("VimwikiLink", s:nord8_gui, "", s:nord8_term, "", s:underline, "")
  684. hi! link VimwikiHeaderChar markdownHeadingDelimiter
  685. hi! link VimwikiHR Keyword
  686. hi! link VimwikiList markdownListMarker
  687. " YAML
  688. " > stephpy/vim-yaml
  689. call s:hi("yamlKey", s:nord7_gui, "", s:nord7_term, "", "", "")
  690. "+------------+
  691. "+ Public API +
  692. "+------------+
  693. "+--- Functions ---+
  694. function! NordPalette() abort
  695. let ret = {}
  696. for color in range(16)
  697. execute 'let ret["nord'.color.'"] = s:nord'.color.'_gui'
  698. endfor
  699. let ret["nord3_bright"] = s:nord3_gui_bright
  700. return ret
  701. endfunction