a duotonic color scheme
1" Name: plain.vim
2" Version: 0.1
3" Maintainer: github.com/andreypopp
4" License: The MIT License (MIT)
5"
6" Based on
7"
8" https://github.com/pbrisbin/vim-colors-off (MIT License)
9"
10" which in turn based on
11"
12" https://github.com/reedes/vim-colors-pencil (MIT License)
13"
14"""
15hi clear
16
17if exists('syntax on')
18 syntax reset
19endif
20
21let g:colors_name='plain'
22
23let s:black = { "gui": "#222222", "cterm": "0" }
24let s:medium_gray = { "gui": "#767676", "cterm": "8" }
25let s:white = { "gui": "#F1F1F1", "cterm": "7" }
26let s:actual_white = { "gui": "#FFFFFF", "cterm": "15" }
27let s:light_black = { "gui": "#424242", "cterm": "8" }
28let s:lighter_black = { "gui": "#545454", "cterm": "8" }
29let s:subtle_black = { "gui": "#303030", "cterm": "11" }
30let s:light_gray = { "gui": "#999999", "cterm": "12" }
31let s:lighter_gray = { "gui": "#CCCCCC", "cterm": "7" }
32let s:lightest_gray = { "gui": "#E5E5E5", "cterm": "13" }
33let s:pink = { "gui": "#FB007A", "cterm": "5" }
34let s:dark_red = { "gui": "#C30771", "cterm": "1" }
35let s:light_red = { "gui": "#E32791", "cterm": "1" }
36let s:orange = { "gui": "#D75F5F", "cterm": "9" }
37let s:darker_blue = { "gui": "#005F87", "cterm": "4" }
38let s:dark_blue = { "gui": "#008EC4", "cterm": "4" }
39let s:blue = { "gui": "#20BBFC", "cterm": "4" }
40let s:light_blue = { "gui": "#B6D6FD", "cterm": "4" }
41let s:dark_cyan = { "gui": "#20A5BA", "cterm": "6" }
42let s:light_cyan = { "gui": "#4FB8CC", "cterm": "6" }
43let s:dark_green = { "gui": "#10A778", "cterm": "6" }
44let s:light_green = { "gui": "#5FD7A7", "cterm": "6" }
45let s:dark_purple = { "gui": "#523C79", "cterm": "5" }
46let s:light_purple = { "gui": "#6855DE", "cterm": "5" }
47let s:light_yellow = { "gui": "#F3E430", "cterm": "3" }
48let s:dark_yellow = { "gui": "#A89C14", "cterm": "3" }
49
50if &background == "dark"
51 let s:bg = s:black
52 let s:bg_subtle = s:light_black
53 let s:bg_very_subtle = s:subtle_black
54 let s:norm = s:lighter_gray
55 let s:norm_subtle = s:light_gray
56 let s:purple = s:light_purple
57 let s:cyan = s:light_cyan
58 let s:green = s:light_green
59 let s:red = s:light_red
60 let s:yellow = s:light_yellow
61 let s:visual = s:subtle_black
62 let s:cursor_line = s:subtle_black
63 let s:status_line = s:lighter_black
64 let s:status_line_nc = s:subtle_black
65 let s:constant = s:light_green
66 let s:comment = s:lighter_black
67 let s:selection = s:light_purple
68 let s:warning = s:yellow
69else
70 let s:bg = s:white
71 let s:bg_subtle = s:lighter_gray
72 let s:bg_very_subtle = s:light_gray
73 let s:norm = s:light_black
74 let s:norm_subtle = s:lighter_black
75 let s:purple = s:dark_purple
76 let s:cyan = s:dark_cyan
77 let s:green = s:dark_green
78 let s:red = s:dark_red
79 let s:yellow = s:dark_yellow
80 let s:visual = s:light_blue
81 let s:cursor_line = s:medium_gray
82 let s:status_line = s:lighter_gray
83 let s:status_line_nc = s:lighter_black
84 let s:constant = s:dark_blue
85 let s:comment = s:light_gray
86 let s:selection = s:light_yellow
87 let s:warning = s:yellow
88endif
89
90" https://github.com/noahfrederick/vim-hemisu/
91function! s:h(group, style)
92 execute "highlight" a:group
93 \ "guifg=" (has_key(a:style, "fg") ? a:style.fg.gui : "NONE")
94 \ "guibg=" (has_key(a:style, "bg") ? a:style.bg.gui : "NONE")
95 \ "guisp=" (has_key(a:style, "sp") ? a:style.sp.gui : "NONE")
96 \ "gui=" (has_key(a:style, "gui") ? a:style.gui : "NONE")
97 \ "ctermfg=" (has_key(a:style, "fg") ? a:style.fg.cterm : "NONE")
98 \ "ctermbg=" (has_key(a:style, "bg") ? a:style.bg.cterm : "NONE")
99 \ "cterm=" (has_key(a:style, "cterm") ? a:style.cterm : "NONE")
100endfunction
101
102call s:h("firstAccent", {"fg": s:cyan})
103call s:h("secondAccent", {"fg": s:purple})
104
105call s:h("Normal", {"fg": s:norm,})
106call s:h("Noise", {"fg": s:norm_subtle})
107call s:h("Cursor", {"bg": s:green, "fg": s:norm})
108call s:h("Comment", {"fg": s:comment, "cterm": "italic"})
109call s:h("Function", {"fg": s:norm, "cterm": "bold"})
110
111hi! link Constant firstAccent
112hi! link Character Constant
113hi! link Number Constant
114hi! link Boolean Constant
115hi! link Float Constant
116hi! link String Constant
117
118"call s:h("Identifier", {"fg": s:dark_blue})
119hi! link Identifier Normal
120
121"hi! link Statement Normal
122call s:h("Statement", {"fg": s:norm, "cterm": "bold"})
123hi! link Conditonal Statement
124hi! link Repeat Statement
125hi! link Label Statement
126hi! link Operator Noise
127hi! link Keyword Statement
128hi! link Exception Statement
129
130"call s:h("PreProc", {"fg": s:red})
131hi! link PreProc Normal
132hi! link Include Statement
133hi! link Define PreProc
134hi! link Macro PreProc
135hi! link PreCondit PreProc
136
137"call s:h("Type", {"fg": s:purple})
138hi! link Type secondAccent
139hi! link StorageClass Type
140hi! link Structure Noise
141hi! link Typedef Noise
142
143"call s:h("Special", {"fg": s:pink})
144hi! link Special StatusLine
145hi! link SpecialChar Special
146hi! link Tag Special
147hi! link Delimiter Special
148hi! link SpecialComment Special
149hi! link Debug Special
150
151hi! link Conceal NonText
152
153call s:h("Underlined", {"fg": s:norm, "gui": "underline", "cterm": "underline"})
154call s:h("Ignore", {"fg": s:bg})
155call s:h("Error", {"fg": s:red, "cterm": "bold"})
156call s:h("Todo", {"fg": s:actual_white, "bg": s:black, "gui": "bold", "cterm": "bold"})
157call s:h("SpecialKey", {"fg": s:subtle_black})
158call s:h("NonText", {"fg": s:bg_very_subtle})
159call s:h("Directory", {"fg": s:dark_green})
160call s:h("ErrorMsg", {"fg": s:pink})
161call s:h("IncSearch", {"bg": s:selection, "fg": s:black})
162call s:h("Search", {"bg": s:selection, "fg": s:black})
163call s:h("CurSearch", {"bg": s:selection, "fg": s:black})
164call s:h("MoreMsg", {"fg": s:medium_gray, "cterm": "bold", "gui": "bold"})
165hi! link ModeMsg MoreMsg
166call s:h("LineNr", {"fg": s:medium_gray})
167call s:h("CursorLineNr", {"fg": s:green, "bg": s:bg_very_subtle})
168call s:h("Question", {"fg": s:red})
169call s:h("VertSplit", {"bg": s:bg, "fg": s:bg_very_subtle})
170call s:h("Title", {"fg": s:dark_green})
171call s:h("Visual", {"bg": s:visual})
172call s:h("VisualNOS", {"bg": s:bg_subtle})
173call s:h("WarningMsg", {"fg": s:warning})
174call s:h("WildMenu", {"fg": s:white, "bg": s:bg})
175call s:h("Folded", {"fg": s:medium_gray})
176call s:h("FoldColumn", {"fg": s:bg_subtle})
177call s:h("DiffAdd", {"fg": s:green})
178call s:h("DiffDelete", {"fg": s:red})
179call s:h("DiffChange", {"fg": s:dark_yellow})
180call s:h("DiffText", {"fg": s:dark_green})
181call s:h("SignColumn", {"fg": s:medium_gray})
182
183if has("gui_running")
184 call s:h("SpellBad", {"gui": "underline", "sp": s:red})
185 call s:h("SpellCap", {"gui": "underline", "sp": s:light_green})
186 call s:h("SpellRare", {"gui": "underline", "sp": s:pink})
187 call s:h("SpellLocal", {"gui": "underline", "sp": s:dark_green})
188else
189 call s:h("SpellBad", {"cterm": "underline", "fg": s:red})
190 call s:h("SpellCap", {"cterm": "underline", "fg": s:light_green})
191 call s:h("SpellRare", {"cterm": "underline", "fg": s:pink})
192 call s:h("SpellLocal", {"cterm": "underline", "fg": s:dark_green})
193endif
194
195""" StatusLine
196call s:h("StatusLine", {"fg": s:status_line})
197call s:h("StatusLineNC", {"fg": s:status_line_nc})
198
199" Those are not standard but are useful to emphasis different parts of the
200" status line.
201call s:h("StatusLineOk", {"gui": "underline", "bg": s:bg, "fg": s:green})
202call s:h("StatusLineError", {"gui": "underline", "bg": s:bg, "fg": s:pink})
203call s:h("StatusLineWarning", {"gui": "underline", "bg": s:bg, "fg": s:warning})
204
205call s:h("Pmenu", {"fg": s:norm, "bg": s:bg_very_subtle})
206call s:h("PmenuSel", {"fg": s:green, "bg": s:bg_very_subtle, "gui": "bold"})
207call s:h("PmenuSbar", {"fg": s:norm, "bg": s:bg_subtle})
208call s:h("PmenuThumb", {"fg": s:norm, "bg": s:bg_subtle})
209call s:h("TabLine", {"fg": s:norm_subtle, "bg": s:bg})
210call s:h("TabLineSel", {"fg": s:norm, "bg": s:bg, "gui": "bold", "cterm": "bold"})
211call s:h("TabLineFill", {"fg": s:norm_subtle, "bg": s:bg})
212call s:h("CursorColumn", {"bg": s:bg_very_subtle})
213call s:h("CursorLine", {"bg": s:cursor_line})
214call s:h("ColorColumn", {"bg": s:bg_subtle})
215
216call s:h("MatchParen", {"bg": s:bg_very_subtle, "fg": s:norm})
217hi link qfLineNr secondAccent
218hi link qfFileName firstAccent
219
220call s:h("htmlH1", {"fg": s:norm})
221call s:h("htmlH2", {"fg": s:norm})
222call s:h("htmlH3", {"fg": s:norm})
223call s:h("htmlH4", {"fg": s:norm})
224call s:h("htmlH5", {"fg": s:norm})
225call s:h("htmlH6", {"fg": s:norm})
226
227call s:h("htmlBold", {"fg": s:norm})
228call s:h("htmlItalic", {"fg": s:norm})
229call s:h("htmlEndTag", {"fg": s:norm})
230call s:h("htmlTag", {"fg": s:norm})
231call s:h("htmlTagName", {"fg": s:norm})
232call s:h("htmlArg", {"fg": s:norm})
233call s:h("htmlError", {"fg": s:red})
234
235" JavaScript highlighting
236"
237call s:h("javaScript", {"bg": s:bg, "fg": s:norm})
238call s:h("javaScriptBraces", {"bg": s:bg, "fg": s:norm})
239call s:h("javaScriptNumber", {"bg": s:bg, "fg": s:green})
240
241hi link diffRemoved DiffDelete
242hi link diffAdded DiffAdd
243
244hi link TSAnnotation secondAccent
245" unstable for now:
246hi link TSAttribute secondAccent
247hi link TSBoolean Constant
248hi link TSCharacter Constant
249hi link TSComment Comment
250hi link TSConstructor Normal
251hi link TSConditional Normal
252hi link TSConstant Constant
253hi link TSConstBuiltin secondAccent
254hi link TSConstMacro secondAccent
255hi link TSError Error
256hi link TSException Error
257hi link TSField Normal
258hi link TSFloat Constant
259hi link TSFunction Normal
260hi link TSFuncBuiltin Noise
261hi link TSFuncMacro secondAccent
262hi link TSInclude Noise
263hi link TSKeyword Noise
264hi link TSKeywordFunction Noise
265hi link TSLabel Noise
266hi link TSMethod Normal
267hi link TSNamespace Noise
268hi link TSNone Noise
269hi link TSNumber Constant
270hi link TSOperator Normal
271hi link TSParameter Statement
272hi link TSParameterReference Statement
273hi link TSProperty TSField
274hi link TSPunctDelimiter Noise
275hi link TSPunctBracket Noise
276hi link TSPunctSpecial Noise
277hi link TSRepeat Normal
278hi link TSString Constant
279hi link TSStringRegex secondAccent
280hi link TSStringEscape secondAccent
281hi link TSStringSpecial secondAccent
282hi link TSTag Statement
283hi link TSTagDelimiter Noise
284hi link TSText Normal
285hi link TSEmphasis Statement
286hi link TSUnderline Underlined
287hi link TSStrike Underlined
288hi link TSTitle Statement
289hi link TSLiteral Noise
290hi link TSURI Constant
291hi link TSType secondAccent
292hi link TSTypeBuiltin secondAccent
293hi link TSVariable Normal
294hi link TSVariableBuiltin Normal
295
296" nvim-lsp diagnostics
297hi link LspDiagnosticsDefaultError Error
298hi link LspDiagnosticsDefaultWarning WarningMsg
299hi link LspDiagnosticsDefaultInformation Noise
300hi link LspDiagnosticsDefaultHint Constant
301
302" Signify, git-gutter
303hi link SignifySignAdd LineNr
304hi link SignifySignDelete LineNr
305hi link SignifySignChange LineNr
306hi link GitGutterAdd LineNr
307hi link GitGutterDelete LineNr
308hi link GitGutterChange LineNr
309hi link GitGutterChangeDelete LineNr
310
311hi link jsFlowTypeKeyword Statement
312hi link jsFlowImportType Statement
313hi link jsFunction Function
314hi link jsGlobalObjects Noise
315hi link jsGlobalNodeObjects Normal
316hi link jsSwitchCase Constant
317
318call s:h("jsSpreadOperator ", {"bg": s:bg, "fg": s:selection})
319hi link jsReturn jsSpreadOperator
320hi link jsExport jsSpreadOperator
321
322call s:h("rustModPath ", {"fg": s:lightest_gray})
323hi link rustMacro secondAccent
324hi link rustKeyword Noise
325hi link rustDerive secondAccent
326hi link rustDeriveTrait secondAccent
327hi link rustAttribute secondAccent
328hi link rustLifetime secondAccent
329
330hi link schemeSyntax Normal
331hi link schemeParentheses Noise
332hi link schemeIdentifier Noise
333
334hi link lispParen Noise
335hi link lispSymbol Noise
336
337hi link shCommandSub secondAccent
338
339hi link cFormat secondAccent
340
341hi link nixBuiltin secondAccent
342hi link nixNamespacedBuiltin secondAccent
343
344hi link awkPatterns secondAccent
345hi link awkVariables Normal
346hi link awkOperator Normal
347hi link awkExpression Noise
348hi link awkArrayElement Noise
349hi link awkFieldVars firstAccent
350hi link awkSpecialPrintf secondAccent
351hi link awkSpecialCharacter Noise
352
353hi link sqlSpecial firstAccent
354hi link sqlKeyword secondAccent
355
356hi link helpExample Normal
357hi link helpCommand secondAccent
358hi link helpBacktick secondAccent
359hi link helpSpecial Normal
360hi link helpUrl secondAccent
361hi link helpHyperTextEntry Title
362hi link helpHyperTextJump String
363
364
365hi link StorageClass Statement
366
367hi link elmType Type
368
369hi link xmlTag Constant
370hi link xmlTagName xmlTag
371hi link xmlEndTag xmlTag
372hi link xmlAttrib xmlTag
373
374hi link markdownH1 Statement
375hi link markdownH2 Statement
376hi link markdownH3 Statement
377hi link markdownH4 Statement
378hi link markdownH5 Statement
379hi link markdownH6 Statement
380hi link markdownListMarker Constant
381hi link markdownCode Constant
382hi link markdownCodeBlock Constant
383hi link markdownCodeDelimiter Constant
384hi link markdownHeadingDelimiter Constant
385
386call s:h("cssBraces", {"bg": s:bg, "fg": s:selection})
387hi link cssTextProp Noise
388hi link cssTagName Normal
389
390
391" leap-nvim support
392hi link LeapMatch Normal
393hi link LeapLabelPrimary Normal
394hi link LeapLabelSecondary Normal
395hi link LeapBackdrop Noise
396
397" lsp ui
398hi link FloatBorder Noise