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("MoreMsg", {"fg": s:medium_gray, "cterm": "bold", "gui": "bold"})
164hi! link ModeMsg MoreMsg
165call s:h("LineNr", {"fg": s:medium_gray})
166call s:h("CursorLineNr", {"fg": s:green, "bg": s:bg_very_subtle})
167call s:h("Question", {"fg": s:red})
168call s:h("VertSplit", {"bg": s:bg, "fg": s:bg_very_subtle})
169call s:h("Title", {"fg": s:dark_green})
170call s:h("Visual", {"bg": s:visual})
171call s:h("VisualNOS", {"bg": s:bg_subtle})
172call s:h("WarningMsg", {"fg": s:warning})
173call s:h("WildMenu", {"fg": s:white, "bg": s:bg})
174call s:h("Folded", {"fg": s:medium_gray})
175call s:h("FoldColumn", {"fg": s:bg_subtle})
176call s:h("DiffAdd", {"fg": s:green})
177call s:h("DiffDelete", {"fg": s:red})
178call s:h("DiffChange", {"fg": s:dark_yellow})
179call s:h("DiffText", {"fg": s:dark_green})
180call s:h("SignColumn", {"fg": s:medium_gray})
181
182if has("gui_running")
183 call s:h("SpellBad", {"gui": "underline", "sp": s:red})
184 call s:h("SpellCap", {"gui": "underline", "sp": s:light_green})
185 call s:h("SpellRare", {"gui": "underline", "sp": s:pink})
186 call s:h("SpellLocal", {"gui": "underline", "sp": s:dark_green})
187else
188 call s:h("SpellBad", {"cterm": "underline", "fg": s:red})
189 call s:h("SpellCap", {"cterm": "underline", "fg": s:light_green})
190 call s:h("SpellRare", {"cterm": "underline", "fg": s:pink})
191 call s:h("SpellLocal", {"cterm": "underline", "fg": s:dark_green})
192endif
193
194""" Help
195hi link helpHyperTextEntry Title
196hi link helpHyperTextJump String
197
198""" StatusLine
199
200call s:h("StatusLine", {"fg": s:status_line})
201call s:h("StatusLineNC", {"fg": s:status_line_nc})
202
203" Those are not standard but are useful to emphasis different parts of the
204" status line.
205call s:h("StatusLineOk", {"gui": "underline", "bg": s:bg, "fg": s:green})
206call s:h("StatusLineError", {"gui": "underline", "bg": s:bg, "fg": s:pink})
207call s:h("StatusLineWarning", {"gui": "underline", "bg": s:bg, "fg": s:warning})
208
209call s:h("Pmenu", {"fg": s:norm, "bg": s:bg_very_subtle})
210call s:h("PmenuSel", {"fg": s:green, "bg": s:bg_very_subtle, "gui": "bold"})
211call s:h("PmenuSbar", {"fg": s:norm, "bg": s:bg_subtle})
212call s:h("PmenuThumb", {"fg": s:norm, "bg": s:bg_subtle})
213call s:h("TabLine", {"fg": s:norm_subtle, "bg": s:bg})
214call s:h("TabLineSel", {"fg": s:norm, "bg": s:bg, "gui": "bold", "cterm": "bold"})
215call s:h("TabLineFill", {"fg": s:norm_subtle, "bg": s:bg})
216call s:h("CursorColumn", {"bg": s:bg_very_subtle})
217call s:h("CursorLine", {"bg": s:cursor_line})
218call s:h("ColorColumn", {"bg": s:bg_subtle})
219
220call s:h("MatchParen", {"bg": s:bg_very_subtle, "fg": s:norm})
221hi link qfLineNr secondAccent
222hi link qfFileName firstAccent
223
224call s:h("htmlH1", {"fg": s:norm})
225call s:h("htmlH2", {"fg": s:norm})
226call s:h("htmlH3", {"fg": s:norm})
227call s:h("htmlH4", {"fg": s:norm})
228call s:h("htmlH5", {"fg": s:norm})
229call s:h("htmlH6", {"fg": s:norm})
230
231call s:h("htmlBold", {"fg": s:norm})
232call s:h("htmlItalic", {"fg": s:norm})
233call s:h("htmlEndTag", {"fg": s:norm})
234call s:h("htmlTag", {"fg": s:norm})
235call s:h("htmlTagName", {"fg": s:norm})
236call s:h("htmlArg", {"fg": s:norm})
237call s:h("htmlError", {"fg": s:red})
238
239" JavaScript highlighting
240"
241call s:h("javaScript", {"bg": s:bg, "fg": s:norm})
242call s:h("javaScriptBraces", {"bg": s:bg, "fg": s:norm})
243call s:h("javaScriptNumber", {"bg": s:bg, "fg": s:green})
244
245hi link diffRemoved DiffDelete
246hi link diffAdded DiffAdd
247
248hi link TSAnnotation secondAccent
249" unstable for now:
250hi link TSAttribute secondAccent
251hi link TSBoolean Constant
252hi link TSCharacter Constant
253hi link TSComment Comment
254hi link TSConstructor Normal
255hi link TSConditional Normal
256hi link TSConstant Constant
257hi link TSConstBuiltin secondAccent
258hi link TSConstMacro secondAccent
259hi link TSError Error
260hi link TSException Error
261hi link TSField Normal
262hi link TSFloat Constant
263hi link TSFunction Normal
264hi link TSFuncBuiltin Noise
265hi link TSFuncMacro secondAccent
266hi link TSInclude Noise
267hi link TSKeyword Noise
268hi link TSKeywordFunction Noise
269hi link TSLabel Noise
270hi link TSMethod Normal
271hi link TSNamespace Noise
272hi link TSNone Noise
273hi link TSNumber Constant
274hi link TSOperator Normal
275hi link TSParameter Statement
276hi link TSParameterReference Statement
277hi link TSProperty TSField
278hi link TSPunctDelimiter Noise
279hi link TSPunctBracket Noise
280hi link TSPunctSpecial Noise
281hi link TSRepeat Normal
282hi link TSString Constant
283hi link TSStringRegex secondAccent
284hi link TSStringEscape secondAccent
285hi link TSStringSpecial secondAccent
286hi link TSTag Statement
287hi link TSTagDelimiter Noise
288hi link TSText Normal
289hi link TSEmphasis Statement
290hi link TSUnderline Underlined
291hi link TSStrike Underlined
292hi link TSTitle Statement
293hi link TSLiteral Noise
294hi link TSURI Constant
295hi link TSType secondAccent
296hi link TSTypeBuiltin secondAccent
297hi link TSVariable Normal
298hi link TSVariableBuiltin Normal
299
300" nvim-lsp diagnostics
301hi link LspDiagnosticsDefaultError Error
302hi link LspDiagnosticsDefaultWarning WarningMsg
303hi link LspDiagnosticsDefaultInformation Noise
304hi link LspDiagnosticsDefaultHint Constant
305
306" Signify, git-gutter
307hi link SignifySignAdd LineNr
308hi link SignifySignDelete LineNr
309hi link SignifySignChange LineNr
310hi link GitGutterAdd LineNr
311hi link GitGutterDelete LineNr
312hi link GitGutterChange LineNr
313hi link GitGutterChangeDelete LineNr
314
315hi link jsFlowTypeKeyword Statement
316hi link jsFlowImportType Statement
317hi link jsFunction Function
318hi link jsGlobalObjects Noise
319hi link jsGlobalNodeObjects Normal
320hi link jsSwitchCase Constant
321
322call s:h("jsSpreadOperator ", {"bg": s:bg, "fg": s:selection})
323hi link jsReturn jsSpreadOperator
324hi link jsExport jsSpreadOperator
325
326call s:h("rustModPath ", {"fg": s:lightest_gray})
327hi link rustMacro secondAccent
328hi link rustKeyword Noise
329hi link rustDerive secondAccent
330hi link rustDeriveTrait secondAccent
331hi link rustAttribute secondAccent
332hi link rustLifetime secondAccent
333
334hi link schemeSyntax Normal
335hi link schemeParentheses Noise
336hi link schemeIdentifier Noise
337
338hi link lispParen Noise
339hi link lispSymbol Noise
340
341hi link shCommandSub secondAccent
342
343hi link cFormat secondAccent
344
345hi link nixBuiltin secondAccent
346hi link nixNamespacedBuiltin secondAccent
347
348hi link awkPatterns secondAccent
349hi link awkVariables Normal
350hi link awkOperator Normal
351hi link awkExpression Noise
352hi link awkArrayElement Noise
353hi link awkFieldVars firstAccent
354hi link awkSpecialPrintf secondAccent
355hi link awkSpecialCharacter Noise
356
357hi link sqlSpecial firstAccent
358hi link sqlKeyword secondAccent
359
360hi link helpExample Noise
361hi link helpCommand secondAccent
362hi link helpBacktick secondAccent
363hi link helpSpecial Noise
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