From 301972f5d7863785a004e887044a8ccacc7f59a4 Mon Sep 17 00:00:00 2001 From: Kai Cataldo Date: Wed, 20 Dec 2017 13:50:08 -0500 Subject: [PATCH] Rewrite using quantum as base --- README.md | 3 +- autoload/material.vim | 36 --- colors/material.vim | 722 ++++++++++++++---------------------------- 3 files changed, 243 insertions(+), 518 deletions(-) delete mode 100644 autoload/material.vim diff --git a/README.md b/README.md index f7adc66..a03027a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # material.vim -A dark color scheme for Vim/Neovim based on the [Material][materialLink] color scheme. This is a fork and is built on the fantastic work done in the [palenight.vim][palenightLink] color scheme. +A dark color scheme for Vim/Neovim based on the [Material][materialLink] color scheme. This is a fork and is built on the fantastic work done in the [palenight.vim][palenightLink] and [quantum](quantumLink) color schemes. ## Screenshots @@ -72,4 +72,5 @@ Corresponding iTerm2 color schemes are included in this repo. You can find theme [materialLink]: https://github.com/equinusocio/material-theme [palenightLink]: https://github.com/drewtempelmeyer/palenight.vim +[quantumLink]: https://github.com/tyrannicaltoucan/vim-quantum [vimplug]: https://github.com/junegunn/vim-plug diff --git a/autoload/material.vim b/autoload/material.vim deleted file mode 100644 index 4825864..0000000 --- a/autoload/material.vim +++ /dev/null @@ -1,36 +0,0 @@ -let s:overrides = get(g:, "material_color_overrides", {}) - -let s:bg_color = { "gui": "#263238", "cterm": "235", "cterm16": "0" } -if exists("g:material_theme_style") - if g:material_theme_style == "palenight" - let s:bg_color = { "gui": "#292D3E", "cterm": "235", "cterm16": "0" } - elseif g:material_theme_style == "dark" - let s:bg_color = { "gui": "#212121", "cterm": "235", "cterm16": "0" } - end -endif - -let s:colors = { - \ "red": get(s:overrides, "red", { "gui": "#ff5370", "cterm": "204", "cterm16": "1" }), - \ "light_red": get(s:overrides, "light_red", { "gui": "#ff869a", "cterm": "204", "cterm16": "1" }), - \ "dark_red": get(s:overrides, "dark_red", { "gui": "#BE5046", "cterm": "196", "cterm16": "9" }), - \ "green": get(s:overrides, "green", { "gui": "#C3E88D", "cterm": "114", "cterm16": "2" }), - \ "yellow": get(s:overrides, "yellow", { "gui": "#ffcb6b", "cterm": "180", "cterm16": "3" }), - \ "dark_yellow": get(s:overrides, "dark_yellow", { "gui": "#F78C6C", "cterm": "173", "cterm16": "11" }), - \ "blue": get(s:overrides, "blue", { "gui": "#82b1ff", "cterm": "39", "cterm16": "4" }), - \ "purple": get(s:overrides, "purple", { "gui": "#c792ea", "cterm": "170", "cterm16": "5" }), - \ "cyan": get(s:overrides, "cyan", { "gui": "#89DDFF", "cterm": "38", "cterm16": "6" }), - \ "white": get(s:overrides, "white", { "gui": "#bfc7d5", "cterm": "145", "cterm16": "7" }), - \ "black": get(s:overrides, "black", s:bg_color), - \ "visual_black": get(s:overrides, "visual_black", { "gui": "NONE", "cterm": "NONE", "cterm16": "0" }), - \ "comment_grey": get(s:overrides, "comment_grey", { "gui": "#697098", "cterm": "59", "cterm16": "15" }), - \ "gutter_fg_grey": get(s:overrides, "gutter_fg_grey", { "gui": "#4B5263", "cterm": "238", "cterm16": "15" }), - \ "cursor_grey": get(s:overrides, "cursor_grey", { "gui": "#2C323C", "cterm": "236", "cterm16": "8" }), - \ "visual_grey": get(s:overrides, "visual_grey", { "gui": "#3E4452", "cterm": "237", "cterm16": "15" }), - \ "menu_grey": get(s:overrides, "menu_grey", { "gui": "#3E4452", "cterm": "237", "cterm16": "8" }), - \ "special_grey": get(s:overrides, "special_grey", { "gui": "#3B4048", "cterm": "238", "cterm16": "15" }), - \ "vertsplit": get(s:overrides, "vertsplit", { "gui": "#181A1F", "cterm": "59", "cterm16": "15" }), - \} - -function! material#GetColors() - return s:colors -endfunction diff --git a/colors/material.vim b/colors/material.vim index 8d27675..ed91a51 100755 --- a/colors/material.vim +++ b/colors/material.vim @@ -1,511 +1,271 @@ -" vim:fdm=marker " Vim Color File " Name: material.vim " Maintainer: https://github.com/kaicataldo/material.vim " License: The MIT License (MIT) -" Based On: https://github.com/drewtempelmeyer/palenight.vim - -" Initialization {{{ +" Based On: https://github.com/tyrannicaltoucan/vim-quantum highlight clear -if exists("syntax_on") +if exists('syntax_on') syntax reset endif -set t_Co=256 - -let g:colors_name = "material" - -" Set to "256" for 256-color terminals, or -" set to "16" to use your terminal emulator's native colors -" (a 16-color palette for this color scheme is available; see -" < https://github.com/joshdick/onedark.vim/blob/master/README.md > -" for more information.) -if !exists("g:material_termcolors") - let g:material_termcolors = 256 +set background=dark +let g:colors_name = 'material' + +let g:material_terminal_italics = get(g:, 'material_terminal_italics', 0) +let g:material_theme_style = get(g:, 'material_theme_style', 'default') + +" Color Palette +if g:material_theme_style == 'default' + let s:gray1 = '#263238' +elseif g:material_theme_style == 'palenight' + let s:gray1 = '#292D3E' +elseif g:material_theme_style == 'dark' + let s:gray1 = '#212121' endif -" Not all terminals support italics properly. If yours does, opt-in. -if !exists("g:material_terminal_italics") - let g:material_terminal_italics = 0 -endif +let s:gray2 = g:material_theme_style == 'dark' ? '#292929' : '#2c3a41' +let s:gray3 = g:material_theme_style == 'dark' ? '#474646' : '#425762' +let s:gray4 = g:material_theme_style == 'dark' ? '#6a6c6c' : '#658494' +let s:gray5 = g:material_theme_style == 'dark' ? '#b7bdc0' : '#aebbc5' +let s:red = '#ff5370' +let s:green = '#c3e88d' +let s:yellow = '#ffcb6b' +let s:blue = '#82aaff' +let s:purple = '#c792ea' +let s:cyan = '#89ddff' +let s:orange = '#f78c6c' +let s:indigo = '#BB80B3' + +function! s:HL(group, fg, bg, attr) + let l:attr = a:attr + if !g:material_terminal_italics && l:attr ==# 'italic' + let l:attr = 'none' + endif -" This function is based on one from FlatColor: https://github.com/MaxSt/FlatColor/ -" Which in turn was based on one found in hemisu: https://github.com/noahfrederick/vim-hemisu/ -function! s:h(group, style) - if g:material_terminal_italics == 0 - if has_key(a:style, "cterm") && a:style["cterm"] == "italic" - unlet a:style.cterm - endif - if has_key(a:style, "gui") && a:style["gui"] == "italic" - unlet a:style.gui - endif + if !empty(a:fg) + exec 'hi ' . a:group . ' guifg=' . a:fg endif - if g:material_termcolors == 16 - let l:ctermfg = (has_key(a:style, "fg") ? a:style.fg.cterm16 : "NONE") - let l:ctermbg = (has_key(a:style, "bg") ? a:style.bg.cterm16 : "NONE") - else - let l:ctermfg = (has_key(a:style, "fg") ? a:style.fg.cterm : "NONE") - let l:ctermbg = (has_key(a:style, "bg") ? a:style.bg.cterm : "NONE") + if !empty(a:bg) + exec 'hi ' . a:group . ' guibg=' . a:bg endif - execute "highlight" a:group - \ "guifg=" (has_key(a:style, "fg") ? a:style.fg.gui : "NONE") - \ "guibg=" (has_key(a:style, "bg") ? a:style.bg.gui : "NONE") - \ "guisp=" (has_key(a:style, "sp") ? a:style.sp.gui : "NONE") - \ "gui=" (has_key(a:style, "gui") ? a:style.gui : "NONE") - \ "ctermfg=" . l:ctermfg - \ "ctermbg=" . l:ctermbg - \ "cterm=" (has_key(a:style, "cterm") ? a:style.cterm : "NONE") -endfunction - -" public {{{ - -function! material#set_highlight(group, style) - call s:h(a:group, a:style) -endfunction - -" }}} - -" }}} - -" Color Variables {{{ - -let s:colors = material#GetColors() - -let s:red = s:colors.red -let s:light_red = s:colors.light_red -let s:dark_red = s:colors.dark_red -let s:green = s:colors.green -let s:yellow = s:colors.yellow -let s:dark_yellow = s:colors.dark_yellow -let s:blue = s:colors.blue -let s:purple = s:colors.purple -let s:cyan = s:colors.cyan -let s:white = s:colors.white -let s:black = s:colors.black -let s:visual_black = s:colors.visual_black " Black out selected text in 16-color visual mode -let s:comment_grey = s:colors.comment_grey -let s:gutter_fg_grey = s:colors.gutter_fg_grey -let s:cursor_grey = s:colors.cursor_grey -let s:visual_grey = s:colors.visual_grey -let s:menu_grey = s:colors.menu_grey -let s:special_grey = s:colors.special_grey -let s:vertsplit = s:colors.vertsplit - -" }}} - -" Syntax Groups (descriptions and ordering from `:h w18`) {{{ - -call s:h("Comment", { "fg": s:comment_grey, "gui": "italic", "cterm": "italic" }) " any comment -call s:h("Constant", { "fg": s:cyan }) " any constant -call s:h("String", { "fg": s:green }) " a string constant: "this is a string" -call s:h("Character", { "fg": s:green }) " a character constant: 'c', '\n' -call s:h("Number", { "fg": s:dark_yellow }) " a number constant: 234, 0xff -call s:h("Boolean", { "fg": s:red }) " a boolean constant: TRUE, false -call s:h("Float", { "fg": s:dark_yellow }) " a floating point constant: 2.3e10 -call s:h("Identifier", { "fg": s:red }) " any variable name -call s:h("Function", { "fg": s:blue }) " function name (also: methods for classes) -call s:h("Statement", { "fg": s:purple }) " any statement -call s:h("Conditional", { "fg": s:purple }) " if, then, else, endif, switch, etc. -call s:h("Repeat", { "fg": s:purple }) " for, do, while, etc. -call s:h("Label", { "fg": s:purple }) " case, default, etc. -call s:h("Operator", { "fg": s:cyan }) " sizeof", "+", "*", etc. -call s:h("Keyword", { "fg": s:red }) " any other keyword -call s:h("Exception", { "fg": s:purple }) " try, catch, throw -call s:h("PreProc", { "fg": s:yellow }) " generic Preprocessor -call s:h("Include", { "fg": s:blue }) " preprocessor #include -call s:h("Define", { "fg": s:purple }) " preprocessor #define -call s:h("Macro", { "fg": s:purple }) " same as Define -call s:h("PreCondit", { "fg": s:yellow }) " preprocessor #if, #else, #endif, etc. -call s:h("Type", { "fg": s:yellow }) " int, long, char, etc. -call s:h("StorageClass", { "fg": s:yellow }) " static, register, volatile, etc. -call s:h("Structure", { "fg": s:yellow }) " struct, union, enum, etc. -call s:h("Typedef", { "fg": s:yellow }) " A typedef -call s:h("Special", { "fg": s:blue }) " any special symbol -call s:h("SpecialChar", {}) " special character in a constant -call s:h("Tag", {}) " you can use CTRL-] on this -call s:h("Delimiter", {}) " character that needs attention -call s:h("SpecialComment", { "fg": s:comment_grey }) " special things inside a comment -call s:h("Debug", {}) " debugging statements -call s:h("Underlined", { "gui": "underline", "cterm": "underline" }) " text that stands out, HTML links -call s:h("Ignore", {}) " left blank, hidden -call s:h("Error", { "fg": s:red }) " any erroneous construct -call s:h("Todo", { "fg": s:purple, "gui": "italic", "cterm": "italic" }) " anything that needs extra attention; mostly the keywords TODO FIXME and XXX - -" }}} - -" Highlighting Groups (descriptions and ordering from `:h hitest.vim`) {{{ - -call s:h("ColorColumn", { "bg": s:cursor_grey }) " used for the columns set with 'colorcolumn' -call s:h("Conceal", {}) " placeholder characters substituted for concealed text (see 'conceallevel') -call s:h("Cursor", { "fg": s:black, "bg": s:blue }) " the character under the cursor -call s:h("CursorIM", {}) " like Cursor, but used when in IME mode -call s:h("CursorColumn", { "bg": s:cursor_grey }) " the screen column that the cursor is in when 'cursorcolumn' is set -call s:h("CursorLine", { "bg": s:cursor_grey }) " the screen line that the cursor is in when 'cursorline' is set -call s:h("Directory", { "fg": s:blue }) " directory names (and other special names in listings) -call s:h("DiffAdd", { "bg": s:green, "fg": s:black }) " diff mode: Added line -call s:h("DiffChange", { "bg": s:yellow, "fg": s:black }) " diff mode: Changed line -call s:h("DiffDelete", { "bg": s:red, "fg": s:black }) " diff mode: Deleted line -call s:h("DiffText", { "bg": s:black, "fg": s:yellow }) " diff mode: Changed text within a changed line -call s:h("ErrorMsg", { "fg": s:red }) " error messages on the command line -call s:h("VertSplit", { "fg": s:vertsplit }) " the column separating vertically split windows -call s:h("Folded", { "fg": s:comment_grey }) " line used for closed folds -call s:h("FoldColumn", {}) " 'foldcolumn' -call s:h("SignColumn", {}) " column where signs are displayed -call s:h("IncSearch", { "fg": s:yellow, "bg": s:comment_grey }) " 'incsearch' highlighting; also used for the text replaced with ":s///c" -call s:h("LineNr", { "fg": s:gutter_fg_grey }) " Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set. -call s:h("CursorLineNr", {}) " Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line. -call s:h("MatchParen", { "fg": s:blue, "gui": "underline" }) " The character under the cursor or just before it, if it is a paired bracket, and its match. -call s:h("ModeMsg", {}) " 'showmode' message (e.g., "-- INSERT --") -call s:h("MoreMsg", {}) " more-prompt -call s:h("NonText", { "fg": s:special_grey }) " '~' and '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). -call s:h("Normal", { "fg": s:white, "bg": s:black }) " normal text -call s:h("Pmenu", { "bg": s:menu_grey }) " Popup menu: normal item. -call s:h("PmenuSel", { "fg": s:black, "bg": s:blue }) " Popup menu: selected item. -call s:h("PmenuSbar", { "bg": s:special_grey }) " Popup menu: scrollbar. -call s:h("PmenuThumb", { "bg": s:white }) " Popup menu: Thumb of the scrollbar. -call s:h("Question", { "fg": s:purple }) " hit-enter prompt and yes/no questions -call s:h("Search", { "fg": s:black, "bg": s:yellow }) " Last search pattern highlighting (see 'hlsearch'). Also used for highlighting the current line in the quickfix window and similar items that need to stand out. -call s:h("SpecialKey", { "fg": s:special_grey }) " Meta and special keys listed with ":map", also for text used to show unprintable characters in the text, 'listchars'. Generally: text that is displayed differently from what it really is. -call s:h("SpellBad", { "fg": s:red, "gui": "underline", "cterm": "underline" }) " Word that is not recognized by the spellchecker. This will be combined with the highlighting used otherwise. -call s:h("SpellCap", { "fg": s:dark_yellow }) " Word that should start with a capital. This will be combined with the highlighting used otherwise. -call s:h("SpellLocal", { "fg": s:dark_yellow }) " Word that is recognized by the spellchecker as one that is used in another region. This will be combined with the highlighting used otherwise. -call s:h("SpellRare", { "fg": s:dark_yellow }) " Word that is recognized by the spellchecker as one that is hardly ever used. spell This will be combined with the highlighting used otherwise. -call s:h("StatusLine", { "fg": s:white, "bg": s:cursor_grey }) " status line of current window -call s:h("StatusLineNC", { "fg": s:comment_grey }) " status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window. -call s:h("TabLine", { "fg": s:comment_grey }) " tab pages line, not active tab page label -call s:h("TabLineFill", {}) " tab pages line, where there are no labels -call s:h("TabLineSel", { "fg": s:white }) " tab pages line, active tab page label -call s:h("Title", { "fg": s:green }) " titles for output from ":set all", ":autocmd" etc. -call s:h("Visual", { "fg": s:visual_black, "bg": s:visual_grey }) " Visual mode selection -call s:h("VisualNOS", { "bg": s:visual_grey }) " Visual mode selection when vim is "Not Owning the Selection". Only X11 Gui's gui-x11 and xterm-clipboard supports this. -call s:h("WarningMsg", { "fg": s:yellow }) " warning messages -call s:h("WildMenu", { "fg": s:black, "bg": s:blue }) " current match in 'wildmenu' completion - -" }}} - -" Language-Specific Highlighting {{{ - -" Dockerfile -call s:h("dockerfileKeyword", { "fg": s:purple }) - -" Shell -call s:h("shSet", { "fg": s:cyan }) -call s:h("shSetOption", { "fg": s:white }) -call s:h("shStatement", { "fg": s:cyan }) -call s:h("shFunctionKey", { "fg": s:purple }) + if !empty(a:attr) + exec 'hi ' . a:group . ' gui=' . l:attr . ' cterm=' . l:attr + endif +endfun + +" Vim Editor +call s:HL('ColorColumn', '', s:gray3, '') +call s:HL('Cursor', s:gray2, s:gray5, '') +call s:HL('CursorColumn', '', s:gray2, '') +call s:HL('CursorLine', '', s:gray2, 'none') +call s:HL('CursorLineNr', s:cyan, s:gray2, 'none') +call s:HL('Directory', s:blue, '', '') +call s:HL('DiffAdd', s:green, s:gray2, 'none') +call s:HL('DiffChange', s:yellow, s:gray2, 'none') +call s:HL('DiffDelete', s:red, s:gray2, 'none') +call s:HL('DiffText', s:blue, s:gray2, 'none') +call s:HL('ErrorMsg', s:red, s:gray1, 'bold') +call s:HL('FoldColumn', s:gray4, s:gray1, '') +call s:HL('Folded', s:gray3, s:gray1, '') +call s:HL('IncSearch', s:yellow, '', '') +call s:HL('LineNr', s:gray3, '', '') +call s:HL('MatchParen', s:gray4, s:cyan, 'bold') +call s:HL('ModeMsg', s:green, '', '') +call s:HL('MoreMsg', s:green, '', '') +call s:HL('NonText', s:gray4, '', 'none') +call s:HL('Normal', s:gray5, s:gray1, 'none') +call s:HL('Pmenu', s:gray5, s:gray3, '') +call s:HL('PmenuSbar', '', s:gray2, '') +call s:HL('PmenuSel', s:gray2, s:cyan, '') +call s:HL('PmenuThumb', '', s:gray4, '') +call s:HL('Question', s:blue, '', 'none') +call s:HL('Search', s:gray1, s:yellow, '') +call s:HL('SignColumn', s:gray5, s:gray1, '') +call s:HL('SpecialKey', s:gray4, '', '') +call s:HL('SpellCap', s:blue, s:gray2, 'undercurl') +call s:HL('SpellBad', s:red, s:gray2, 'undercurl') +call s:HL('StatusLine', s:gray5, s:gray3, 'none') +call s:HL('StatusLineNC', s:gray2, s:gray4, '') +call s:HL('TabLine', s:gray4, s:gray2, 'none') +call s:HL('TabLineFill', s:gray4, s:gray2, 'none') +call s:HL('TabLineSel', s:yellow, s:gray3, 'none') +call s:HL('Title', s:green, '', 'none') +call s:HL('VertSplit', s:gray4, s:gray1, 'none') +call s:HL('Visual', s:gray5, s:gray3, '') +call s:HL('WarningMsg', s:red, '', '') +call s:HL('WildMenu', s:gray2, s:cyan, '') + +" Standard Syntax +call s:HL('Comment', s:gray4, '', 'italic') +call s:HL('Constant', s:orange, '', '') +call s:HL('String', s:green, '', '') +call s:HL('Character', s:green, '', '') +call s:HL('Identifier', s:red, '', 'none') +call s:HL('Function', s:blue, '', '') +call s:HL('Statement', s:purple, '', 'none') +call s:HL('Operator', s:cyan, '', '') +call s:HL('PreProc', s:cyan, '', '') +call s:HL('Include', s:blue, '', '') +call s:HL('Define', s:purple, '', 'none') +call s:HL('Macro', s:purple, '', '') +call s:HL('Type', s:yellow, '', 'none') +call s:HL('Structure', s:cyan, '', '') +call s:HL('Special', s:indigo, '', '') +call s:HL('Underlined', s:blue, '', 'none') +call s:HL('Error', s:red, s:gray1, '') +call s:HL('Todo', s:orange, s:gray1, 'italic') " CSS -call s:h("cssAttrComma", { "fg": s:purple }) -call s:h("cssAttributeSelector", { "fg": s:green }) -call s:h("cssBraces", { "fg": s:white }) -call s:h("cssClassName", { "fg": s:dark_yellow }) -call s:h("cssClassNameDot", { "fg": s:dark_yellow }) -call s:h("cssDefinition", { "fg": s:purple }) -call s:h("cssFontAttr", { "fg": s:dark_yellow }) -call s:h("cssFontDescriptor", { "fg": s:purple }) -call s:h("cssFunctionName", { "fg": s:blue }) -call s:h("cssIdentifier", { "fg": s:blue }) -call s:h("cssImportant", { "fg": s:purple }) -call s:h("cssInclude", { "fg": s:white }) -call s:h("cssIncludeKeyword", { "fg": s:purple }) -call s:h("cssMediaType", { "fg": s:dark_yellow }) -call s:h("cssProp", { "fg": s:white }) -call s:h("cssPseudoClassId", { "fg": s:dark_yellow }) -call s:h("cssSelectorOp", { "fg": s:purple }) -call s:h("cssSelectorOp2", { "fg": s:purple }) -call s:h("cssTagName", { "fg": s:red }) - -" Go -call s:h("goDeclaration", { "fg": s:purple }) +call s:HL('cssAttrComma', s:gray5, '', '') +call s:HL('cssPseudoClassId', s:yellow, '', '') +call s:HL('cssBraces', s:gray5, '', '') +call s:HL('cssClassName', s:yellow, '', '') +call s:HL('cssClassNameDot', s:yellow, '', '') +call s:HL('cssFunctionName', s:blue, '', '') +call s:HL('cssImportant', s:cyan, '', '') +call s:HL('cssIncludeKeyword', s:purple, '', '') +call s:HL('cssTagName', s:red, '', '') +call s:HL('cssMediaType', s:orange, '', '') +call s:HL('cssProp', s:gray5, '', '') +call s:HL('cssSelectorOp', s:cyan, '', '') +call s:HL('cssSelectorOp2', s:cyan, '', '') + +" Commit Messages (Git) +call s:HL('gitcommitHeader', s:purple, '', '') +call s:HL('gitcommitUnmerged', s:green, '', '') +call s:HL('gitcommitSelectedFile', s:green, '', '') +call s:HL('gitcommitDiscardedFile', s:red, '', '') +call s:HL('gitcommitUnmergedFile', s:yellow, '', '') +call s:HL('gitcommitSelectedType', s:green, '', '') +call s:HL('gitcommitSummary', s:blue, '', '') +call s:HL('gitcommitDiscardedType', s:red, '', '') +hi link gitcommitNoBranch gitcommitBranch +hi link gitcommitUntracked gitcommitComment +hi link gitcommitDiscarded gitcommitComment +hi link gitcommitSelected gitcommitComment +hi link gitcommitDiscardedArrow gitcommitDiscardedFile +hi link gitcommitSelectedArrow gitcommitSelectedFile +hi link gitcommitUnmergedArrow gitcommitUnmergedFile " HTML -call s:h("htmlTitle", { "fg": s:white }) -call s:h("htmlArg", { "fg": s:yellow, "gui": "italic", "cterm": "italic" }) -call s:h("htmlEndTag", { "fg": s:cyan }) -call s:h("htmlH1", { "fg": s:white }) -call s:h("htmlLink", { "fg": s:purple }) -call s:h("htmlSpecialChar", { "fg": s:dark_yellow }) -call s:h("htmlSpecialTagName", { "fg": s:red }) -call s:h("htmlTag", { "fg": s:cyan }) -call s:h("htmlTagName", { "fg": s:red }) - -" Coffeescript -call s:h("coffeeExtendedOp", { "fg": s:purple }) - -" JavaScript -call s:h("javaScriptBraces", { "fg": s:white }) -call s:h("javaScriptFunction", { "fg": s:purple }) -call s:h("javaScriptIdentifier", { "fg": s:purple }) -call s:h("javaScriptNull", { "fg": s:dark_yellow }) -call s:h("javaScriptNumber", { "fg": s:dark_yellow }) -call s:h("javaScriptRequire", { "fg": s:cyan }) -call s:h("javaScriptReserved", { "fg": s:purple }) -" https://github.com/pangloss/vim-javascript -call s:h("jsArrowFunction", { "fg": s:purple }) -call s:h("jsClassKeyword", { "fg": s:purple }) -call s:h("jsClassDefinition", { "fg": s:yellow }) -call s:h("jsClassMethodType", { "fg": s:purple }) -call s:h("jsClassFuncName", { "fg": s:blue }) -call s:h("jsDestructuringBlock", { "fg": s:blue }) -call s:h("jsDocParam", { "fg": s:blue }) -call s:h("jsDocTags", { "fg": s:purple }) -call s:h("jsExport", { "fg": s:purple }) -call s:h("jsExportDefault", { "fg": s:red }) -call s:h("jsExtendsKeyword", { "fg": s:purple }) -call s:h("jsConditional", { "fg": s:purple }) -call s:h("jsOperator", { "fg": s:purple }) -call s:h("jsFrom", { "fg": s:purple }) -call s:h("jsFuncArgs", { "fg": s:blue }) -call s:h("jsFuncCall", { "fg": s:blue }) -call s:h("jsFuncName", { "fg": s:blue }) -call s:h("jsObjectProp", { "fg": s:cyan }) -call s:h("jsFunction", { "fg": s:purple }) -call s:h("jsGenerator", { "fg": s:yellow }) -call s:h("jsGlobalObjects", { "fg": s:yellow }) -call s:h("jsImport", { "fg": s:purple }) -call s:h("jsModuleAs", { "fg": s:purple }) -call s:h("jsModuleWords", { "fg": s:purple }) -call s:h("jsModuleKeyword", { "fg": s:blue }) -call s:h("jsModules", { "fg": s:purple }) -call s:h("jsNull", { "fg": s:dark_yellow }) -call s:h("jsStorageClass", { "fg": s:purple }) -call s:h("jsSuper", { "fg": s:red }) -call s:h("jsTemplateBraces", { "fg": s:dark_red }) -call s:h("jsTemplateVar", { "fg": s:green }) -call s:h("jsThis", { "fg": s:red }) -call s:h("jsUndefined", { "fg": s:dark_yellow }) -" call s:h("jsVariableDef", { "fg": s:blue }) -" https://github.com/othree/yajs.vim -call s:h("javascriptArrowFunc", { "fg": s:purple }) -call s:h("javascriptClassExtends", { "fg": s:purple }) -call s:h("javascriptClassKeyword", { "fg": s:purple }) -call s:h("javascriptDocNotation", { "fg": s:purple }) -call s:h("javascriptDocParamName", { "fg": s:blue }) -call s:h("javascriptDocTags", { "fg": s:purple }) -call s:h("javascriptEndColons", { "fg": s:white }) -call s:h("javascriptExport", { "fg": s:purple }) -call s:h("javascriptFuncArg", { "fg": s:white }) -call s:h("javascriptFuncKeyword", { "fg": s:purple }) -call s:h("javascriptIdentifier", { "fg": s:red }) -call s:h("javascriptImport", { "fg": s:purple }) -call s:h("javascriptMethodName", { "fg": s:white }) -call s:h("javascriptObjectLabel", { "fg": s:white }) -call s:h("javascriptOpSymbol", { "fg": s:cyan }) -call s:h("javascriptOpSymbols", { "fg": s:cyan }) -call s:h("javascriptPropertyName", { "fg": s:green }) -call s:h("javascriptTemplateSB", { "fg": s:dark_red }) -call s:h("javascriptVariable", { "fg": s:purple }) +call s:HL('htmlEndTag', s:blue, '', '') +call s:HL('htmlLink', s:red, '', '') +call s:HL('htmlTag', s:blue, '', '') +call s:HL('htmlTitle', s:gray5, '', '') +call s:HL('htmlSpecialTagName', s:purple, '', '') +call s:HL('htmlArg', s:yellow, '', 'italic') + +" Javascript +call s:HL('javaScriptBraces', s:gray5, '', '') +call s:HL('javaScriptNull', s:orange, '', '') +call s:HL('javaScriptIdentifier', s:purple, '', '') +call s:HL('javaScriptNumber', s:orange, '', '') +call s:HL('javaScriptRequire', s:cyan, '', '') +call s:HL('javaScriptReserved', s:purple, '', '') +" pangloss/vim-javascript +call s:HL('jsArrowFunction', s:purple, '', '') +call s:HL('jsAsyncKeyword', s:purple, '', '') +call s:HL('jsExtendsKeyword', s:purple, '', '') +call s:HL('jsClassKeyword', s:purple, '', '') +call s:HL('jsDocParam', s:green, '', '') +call s:HL('jsDocTags', s:cyan, '', '') +call s:HL('jsForAwait', s:purple, '', '') +call s:HL('jsFlowArgumentDef', s:yellow, '', '') +call s:HL('jsFrom', s:purple, '', '') +call s:HL('jsImport', s:purple, '', '') +call s:HL('jsExport', s:purple, '', '') +call s:HL('jsExportDefault', s:purple, '', '') +call s:HL('jsFuncCall', s:blue, '', '') +call s:HL('jsFunction', s:purple, '', '') +call s:HL('jsGlobalObjects', s:yellow, '', '') +call s:HL('jsGlobalNodeObjects', s:yellow, '', '') +call s:HL('jsModuleAs', s:purple, '', '') +call s:HL('jsNull', s:orange, '', '') +call s:HL('jsStorageClass', s:purple, '', '') +call s:HL('jsTemplateBraces', s:red, '', '') +call s:HL('jsTemplateExpression', s:red, '', '') +call s:HL('jsThis', s:red, '', '') +call s:HL('jsUndefined', s:orange, '', '') " JSON -call s:h("jsonCommentError", { "fg": s:white }) -call s:h("jsonKeyword", { "fg": s:blue }) -call s:h("jsonBoolean", { "fg": s:red }) -call s:h("jsonNumber", { "fg": s:dark_yellow }) -call s:h("jsonQuote", { "fg": s:white }) -call s:h("jsonMissingCommaError", { "fg": s:red, "gui": "reverse" }) -call s:h("jsonNoQuotesError", { "fg": s:red, "gui": "reverse" }) -call s:h("jsonNumError", { "fg": s:red, "gui": "reverse" }) -call s:h("jsonString", { "fg": s:green }) -call s:h("jsonStringSQError", { "fg": s:red, "gui": "reverse" }) -call s:h("jsonSemicolonError", { "fg": s:red, "gui": "reverse" }) +call s:HL('jsonBraces', s:gray5, '', '') + +" Less +call s:HL('lessAmpersand', s:red, '', '') +call s:HL('lessClassChar', s:yellow, '', '') +call s:HL('lessCssAttribute', s:gray5, '', '') +call s:HL('lessFunction', s:blue, '', '') +call s:HL('lessVariable', s:purple, '', '') " Markdown -call s:h("markdownCode", { "fg": s:green }) -call s:h("markdownCodeBlock", { "fg": s:green }) -call s:h("markdownCodeDelimiter", { "fg": s:green }) -call s:h("markdownHeadingDelimiter", { "fg": s:red }) -call s:h("markdownRule", { "fg": s:comment_grey }) -call s:h("markdownHeadingRule", { "fg": s:comment_grey }) -call s:h("htmlH1", { "fg": s:blue }) -call s:h("htmlH2", { "fg": s:blue }) -call s:h("htmlH3", { "fg": s:blue }) -call s:h("htmlH4", { "fg": s:blue }) -call s:h("htmlH5", { "fg": s:blue }) -call s:h("htmlH6", { "fg": s:blue }) -call s:h("mkdDelimiter", { "fg": s:cyan }) -call s:h("markdownId", { "fg": s:purple }) -call s:h("markdownBlockquote", { "fg": s:comment_grey }) -call s:h("markdownItalic", { "fg": s:purple, "gui": "italic", "cterm": "italic" }) -call s:h("mkdBold", { "fg": s:yellow, "gui": "bold", "cterm": "bold" }) -call s:h("mkdInlineURL", { "fg": s:light_red }) -call s:h("mkdListItem", { "fg": s:yellow }) -call s:h("markdownOrderedListMarker", { "fg": s:red }) -call s:h("markdownIdDeclaration", { "fg": s:blue }) -call s:h("mkdLink", { "fg": s:white }) -call s:h("markdownLinkDelimiter", { "fg": s:white }) -call s:h("mkdURL", { "fg": s:light_red }) +call s:HL('markdownBold', s:yellow, '', 'bold') +call s:HL('markdownCode', s:cyan, '', '') +call s:HL('markdownCodeBlock', s:cyan, '', '') +call s:HL('markdownCodeDelimiter', s:cyan, '', '') +call s:HL('markdownHeadingDelimiter', s:green, '', '') +call s:HL('markdownHeadingRule', s:gray4, '', '') +call s:HL('markdownId', s:purple, '', '') +call s:HL('markdownItalic', s:blue, '', 'italic') +call s:HL('markdownListMarker', s:orange, '', '') +call s:HL('markdownOrderedListMarker', s:orange, '', '') +call s:HL('markdownRule', s:gray4, '', '') +call s:HL('markdownUrl', s:purple, '', '') +call s:HL('markdownUrlTitleDelimiter', s:green, '', '') " Ruby -call s:h("rubyAccess", { "fg": s:cyan }) -call s:h("rubyBlockParameter", { "fg": s:yellow}) -call s:h("rubyBlockParameterList", { "fg": s:white }) -call s:h("rubyBoolean", { "fg": s:red }) -call s:h("rubyCapitalizedMethod", { "fg": s:blue}) -call s:h("rubyClass", { "fg": s:purple}) -call s:h("rubyClassName", { "fg": s:yellow }) -call s:h("rubyConstant", { "fg": s:yellow }) -call s:h("rubyControl", { "fg": s:purple }) -call s:h("rubyEscape", { "fg": s:red}) -call s:h("rubyFunction", { "fg": s:blue}) -call s:h("rubyGlobalVariable", { "fg": s:red}) -call s:h("rubyInclude", { "fg": s:cyan}) -call s:h("rubyIncluderubyGlobalVariable", { "fg": s:red}) -call s:h("rubyInstanceVariable", { "fg": s:red}) -call s:h("rubyInterpolation", { "fg": s:cyan }) -call s:h("rubyInterpolationDelimiter", { "fg": s:red }) -call s:h("rubyModuleName", { "fg": s:white }) -call s:h("rubyKeyword", { "fg": s:purple }) -call s:h("rubyKeywordAsMethod", { "fg": s:cyan}) -call s:h("rubyOperator", { "fg": s:purple }) -call s:h("rubyPredefinedConstant", { "fg": s:yellow}) -call s:h("rubyPseudoVariable", { "fg": s:blue }) -call s:h("rubyRegexp", { "fg": s:white}) -call s:h("rubyRegexpDelimiter", { "fg": s:cyan}) -call s:h("rubySharpBang", { "fg": s:comment_grey}) -call s:h("rubyStringDelimiter", { "fg": s:green}) -call s:h("rubySymbol", { "fg": s:blue}) - -" ERb -call s:h("erubyDelimiter", { "fg": s:red }) - -" Rails -call s:h("railsAssetPreProc", { "fg": s:comment_grey }) -call s:h("railsAssetInclude", { "fg": s:comment_grey }) -call s:h("railsAssetIncluded", { "fg": s:comment_grey }) -call s:h("rubyRailsMethod", { "fg": s:blue }) -call s:h("rubyRailsFilterMethod", { "fg": s:cyan }) -call s:h("rubyRailsRenderMethod", { "fg": s:cyan }) -call s:h("rubyRailsARAssociationMethod", { "fg": s:cyan }) -call s:h("rubyRailsHelperMethod", { "fg": s:cyan }) - -" RSpec -call s:h("rspecGroupMethods", { "fg": s:white }) -call s:h("rspecBeforeAndAfter", { "fg": s:white }) - -" CSS -call s:h("cssColor", { "fg": s:dark_yellow }) -call s:h("cssCommonAttr", { "fg": s:blue }) -call s:h("cssProp", { "fg": s:cyan }) -call s:h("cssSelectorOp", { "fg": s:white }) -call s:h("cssUnitDecorators", { "fg": s:yellow }) +call s:HL('rubyInterpolation', s:cyan, '', '') +call s:HL('rubyInterpolationDelimiter', s:indigo, '', '') +call s:HL('rubyRegexp', s:cyan, '', '') +call s:HL('rubyRegexpDelimiter', s:indigo, '', '') +call s:HL('rubyStringDelimiter', s:green, '', '') " Sass -" https://github.com/tpope/vim-haml -call s:h("sassAmpersand", { "fg": s:red }) -call s:h("sassClass", { "fg": s:dark_yellow }) -call s:h("sassControl", { "fg": s:purple }) -call s:h("sassExtend", { "fg": s:purple }) -call s:h("sassFor", { "fg": s:white }) -call s:h("sassFunction", { "fg": s:cyan }) -call s:h("sassId", { "fg": s:blue }) -call s:h("sassInclude", { "fg": s:purple }) -call s:h("sassMedia", { "fg": s:purple }) -call s:h("sassMediaOperators", { "fg": s:white }) -call s:h("sassMixin", { "fg": s:purple }) -call s:h("sassMixinName", { "fg": s:blue }) -call s:h("sassMixing", { "fg": s:purple }) -call s:h("sassVariable", { "fg": s:dark_yellow }) -" https://github.com/cakebaker/scss-syntax.vim -call s:h("scssExtend", { "fg": s:purple }) -call s:h("scssExtendedSelector", { "fg": s:dark_yellow }) -call s:h("scssFunctionName", { "fg": s:cyan }) -call s:h("scssImport", { "fg": s:purple }) -call s:h("scssInclude", { "fg": s:purple }) -call s:h("scssMixin", { "fg": s:purple }) -call s:h("scssMixinName", { "fg": s:blue }) -call s:h("scssSelectorName", { "fg": s:yellow }) -call s:h("scssVariable", { "fg": s:dark_yellow }) - -" TypeScript -call s:h("typescriptReserved", { "fg": s:purple }) -call s:h("typescriptEndColons", { "fg": s:white }) -call s:h("typescriptBraces", { "fg": s:white }) +call s:HL('sassAmpersand', s:red, '', '') +call s:HL('sassClassChar', s:yellow, '', '') +call s:HL('sassMixinName', s:blue, '', '') +call s:HL('sassVariable', s:purple, '', '') + +" Vim-Fugitive +call s:HL('diffAdded', s:green, '', '') +call s:HL('diffRemoved', s:red, '', '') + +" Vim-Gittgutter +call s:HL('GitGutterAdd', s:green, '', '') +call s:HL('GitGutterChange', s:yellow, '', '') +call s:HL('GitGutterChangeDelete', s:orange, '', '') +call s:HL('GitGutterDelete', s:red, '', '') + +" Vim-Signify +hi link SignifySignAdd GitGutterAdd +hi link SignifySignChange GitGutterChange +hi link SignifySignDelete GitGutterDelete " XML -call s:h("xmlAttrib", { "fg": s:yellow, "gui": "italic", "cterm": "italic" }) -call s:h("xmlEndTag", { "fg": s:red }) -call s:h("xmlTag", { "fg": s:red }) -call s:h("xmlTagName", { "fg": s:red }) - -" }}} - -" Plugin Highlighting {{{ - -" airblade/vim-gitgutter -hi link GitGutterAdd SignifySignAdd -hi link GitGutterChange SignifySignChange -hi link GitGutterDelete SignifySignDelete - -" mhinz/vim-signify -call s:h("SignifySignAdd", { "fg": s:green }) -call s:h("SignifySignChange", { "fg": s:yellow }) -call s:h("SignifySignDelete", { "fg": s:red }) - -" neomake/neomake -call s:h("NeomakeWarningSign", { "fg": s:yellow }) -call s:h("NeomakeErrorSign", { "fg": s:red }) -call s:h("NeomakeInfoSign", { "fg": s:blue }) - -" tpope/vim-fugitive -call s:h("diffAdded", { "fg": s:green }) -call s:h("diffRemoved", { "fg": s:red }) - -" }}} - -" Git Highlighting {{{ - -call s:h("gitcommitComment", { "fg": s:comment_grey }) -call s:h("gitcommitUnmerged", { "fg": s:green }) -call s:h("gitcommitOnBranch", {}) -call s:h("gitcommitBranch", { "fg": s:purple }) -call s:h("gitcommitDiscardedType", { "fg": s:red }) -call s:h("gitcommitSelectedType", { "fg": s:green }) -call s:h("gitcommitHeader", {}) -call s:h("gitcommitUntrackedFile", { "fg": s:cyan }) -call s:h("gitcommitDiscardedFile", { "fg": s:red }) -call s:h("gitcommitSelectedFile", { "fg": s:green }) -call s:h("gitcommitUnmergedFile", { "fg": s:yellow }) -call s:h("gitcommitFile", {}) -call s:h("gitcommitSummary", { "fg": s:white }) -call s:h("gitcommitOverflow", { "fg": s:red }) -hi link gitcommitNoBranch gitcommitBranch -hi link gitcommitUntracked gitcommitComment -hi link gitcommitDiscarded gitcommitComment -hi link gitcommitSelected gitcommitComment -hi link gitcommitDiscardedArrow gitcommitDiscardedFile -hi link gitcommitSelectedArrow gitcommitSelectedFile -hi link gitcommitUnmergedArrow gitcommitUnmergedFile - -" }}} - -" Neovim terminal colors {{{ - -if has("nvim") - let g:terminal_color_0 = s:black.gui - let g:terminal_color_1 = s:red.gui - let g:terminal_color_2 = s:green.gui - let g:terminal_color_3 = s:yellow.gui - let g:terminal_color_4 = s:blue.gui - let g:terminal_color_5 = s:purple.gui - let g:terminal_color_6 = s:cyan.gui - let g:terminal_color_7 = s:white.gui - let g:terminal_color_8 = s:visual_grey.gui - let g:terminal_color_9 = s:dark_red.gui - let g:terminal_color_10 = s:green.gui " No dark version - let g:terminal_color_11 = s:dark_yellow.gui - let g:terminal_color_12 = s:blue.gui " No dark version - let g:terminal_color_13 = s:purple.gui " No dark version - let g:terminal_color_14 = s:cyan.gui " No dark version - let g:terminal_color_15 = s:comment_grey.gui - let g:terminal_color_background = g:terminal_color_0 - let g:terminal_color_foreground = g:terminal_color_7 +call s:HL('xmlAttrib', s:yellow, '', 'italic') +call s:HL('xmlEndTag', s:blue, '', '') +call s:HL('xmlTag', s:blue, '', '') +call s:HL('xmlTagName', s:blue, '', '') + +" Neovim terminal colors +if has('nvim') + let g:terminal_color_0 = s:gray1 + let g:terminal_color_1 = s:red + let g:terminal_color_2 = s:green + let g:terminal_color_3 = s:yellow + let g:terminal_color_4 = s:blue + let g:terminal_color_5 = s:purple + let g:terminal_color_6 = s:cyan + let g:terminal_color_7 = s:gray5 + let g:terminal_color_8 = s:gray3 + let g:terminal_color_9 = s:red + let g:terminal_color_10 = s:green + let g:terminal_color_11 = s:yellow + let g:terminal_color_12 = s:blue + let g:terminal_color_13 = s:purple + let g:terminal_color_14 = s:cyan + let g:terminal_color_15 = s:gray4 + let g:terminal_color_background = g:terminal_color_0 + let g:terminal_color_foreground = g:terminal_color_7 endif - -" }}} - -" Must appear at the end of the file to work around this oddity: -" https://groups.google.com/forum/#!msg/vim_dev/afPqwAFNdrU/nqh6tOM87QUJ -set background=dark -