From e0ab76c2742cb0bfaef0fc0f66be47543dd8bf1a Mon Sep 17 00:00:00 2001 From: laggardkernel Date: Wed, 10 Apr 2019 20:18:05 +0800 Subject: [PATCH 1/2] Reuse hi definitions with hi link `hi link` reduces loading time from 33.6 ms to 18.3 ms. Force link `hi! link` is needed to override default settings, otherwise warning messages will be popped up during theme loading. --- colors/one.vim | 668 +++++++++++++++++++++++++------------------------ 1 file changed, 343 insertions(+), 325 deletions(-) diff --git a/colors/one.vim b/colors/one.vim index 715d9e9..f54e9d6 100644 --- a/colors/one.vim +++ b/colors/one.vim @@ -353,6 +353,24 @@ if has('gui_running') || has('termguicolors') || &t_Co == 88 || &t_Co == 256 " }}} + " Pre-define some hi groups -----------------------------------------------{{{ + call X('OneMono1', s:mono_1, '', '') + call X('OneMono2', s:mono_2, '', '') + call X('OneMono3', s:mono_3, '', '') + call X('OneMono4', s:mono_4, '', '') + + call X('OneHue1', s:hue_1, '', '') + call X('OneHue2', s:hue_2, '', '') + call X('OneHue3', s:hue_3, '', '') + call X('OneHue4', s:hue_4, '', '') + call X('OneHue5', s:hue_5, '', '') + call X('OneHue52', s:hue_5_2, '', '') + call X('OneHue6', s:hue_6, '', '') + call X('OneHue62', s:hue_6_2, '', '') + + hi! link OneSyntaxFg OneMono1 + " }}} + " Vim editor color --------------------------------------------------------{{{ call X('Normal', s:syntax_fg, s:syntax_bg, '') call X('bold', '', '', 'bold') @@ -362,76 +380,76 @@ if has('gui_running') || has('termguicolors') || &t_Co == 88 || &t_Co == 256 call X('CursorIM', '', '', '') call X('CursorColumn', '', s:syntax_cursor, '') call X('CursorLine', '', s:syntax_cursor, 'none') - call X('Directory', s:hue_2, '', '') + hi! link Directory OneHue2 call X('ErrorMsg', s:hue_5, s:syntax_bg, 'none') call X('VertSplit', s:vertsplit, '', 'none') call X('Folded', s:syntax_bg, s:syntax_fold_bg, 'none') call X('FoldColumn', s:mono_3, s:syntax_cursor, '') - call X('IncSearch', s:hue_6, '', '') - call X('LineNr', s:mono_4, '', '') + hi! link IncSearch OneHue6 + hi! link LineNr OneMono4 call X('CursorLineNr', s:syntax_fg, s:syntax_cursor, 'none') call X('MatchParen', s:hue_5, s:syntax_cursor, 'underline,bold') call X('Italic', '', '', s:italic) - call X('ModeMsg', s:syntax_fg, '', '') - call X('MoreMsg', s:syntax_fg, '', '') + hi! link ModeMsg OneSyntaxFg + hi! link MoreMsg OneSyntaxFg call X('NonText', s:mono_3, '', 'none') call X('PMenu', '', s:pmenu, '') call X('PMenuSel', '', s:mono_4, '') call X('PMenuSbar', '', s:syntax_bg, '') call X('PMenuThumb', '', s:mono_1, '') - call X('Question', s:hue_2, '', '') + hi! link Question OneHue2 call X('Search', s:syntax_bg, s:hue_6_2, '') call X('SpecialKey', s:special_grey, '', 'none') call X('Whitespace', s:special_grey, '', 'none') call X('StatusLine', s:syntax_fg, s:syntax_cursor, 'none') - call X('StatusLineNC', s:mono_3, '', '') + hi! link StatusLineNC OneMono3 call X('TabLine', s:mono_1, s:syntax_bg, '') call X('TabLineFill', s:mono_3, s:visual_grey, 'none') call X('TabLineSel', s:syntax_bg, s:hue_2, '') call X('Title', s:syntax_fg, '', 'bold') call X('Visual', '', s:visual_grey, '') call X('VisualNOS', '', s:visual_grey, '') - call X('WarningMsg', s:hue_5, '', '') - call X('TooLong', s:hue_5, '', '') + hi! link WarningMsg OneHue5 + hi! link TooLong OneHue5 call X('WildMenu', s:syntax_fg, s:mono_3, '') call X('SignColumn', '', s:syntax_bg, '') - call X('Special', s:hue_2, '', '') + hi! link Special OneHue2 " }}} " Vim Help highlighting ---------------------------------------------------{{{ - call X('helpCommand', s:hue_6_2, '', '') - call X('helpExample', s:hue_6_2, '', '') + hi! link helpCommand OneHue62 + hi! link helpExample OneHue62 call X('helpHeader', s:mono_1, '', 'bold') - call X('helpSectionDelim', s:mono_3, '', '') + hi! link helpSectionDelim OneMono3 " }}} " Standard syntax highlighting --------------------------------------------{{{ call X('Comment', s:mono_3, '', s:italic) - call X('Constant', s:hue_4, '', '') - call X('String', s:hue_4, '', '') - call X('Character', s:hue_4, '', '') - call X('Number', s:hue_6, '', '') - call X('Boolean', s:hue_6, '', '') - call X('Float', s:hue_6, '', '') + hi! link Constant OneHue4 + hi! link String OneHue4 + hi! link Character OneHue4 + hi! link Number OneHue6 + hi! link Boolean OneHue6 + hi! link Float OneHue6 call X('Identifier', s:hue_5, '', 'none') - call X('Function', s:hue_2, '', '') - call X('Statement', s:hue_3, '', 'none') - call X('Conditional', s:hue_3, '', '') - call X('Repeat', s:hue_3, '', '') - call X('Label', s:hue_3, '', '') + hi! link Function OneHue2 + hi! link Statement OneHue3 + hi! link Conditional OneHue3 + hi! link Repeat OneHue3 + hi! link Label OneHue3 call X('Operator', s:syntax_accent, '', 'none') - call X('Keyword', s:hue_5, '', '') - call X('Exception', s:hue_3, '', '') - call X('PreProc', s:hue_6_2, '', '') - call X('Include', s:hue_2, '', '') - call X('Define', s:hue_3, '', 'none') - call X('Macro', s:hue_3, '', '') - call X('PreCondit', s:hue_6_2, '', '') - call X('Type', s:hue_6_2, '', 'none') - call X('StorageClass', s:hue_6_2, '', '') - call X('Structure', s:hue_6_2, '', '') - call X('Typedef', s:hue_6_2, '', '') - call X('Special', s:hue_2, '', '') + hi! link Keyword OneHue5 + hi! link Exception OneHue3 + hi! link PreProc OneHue62 + hi! link Include OneHue2 + hi! link Define OneHue3 + hi! link Macro OneHue3 + hi! link PreCondit OneHue62 + hi! link Type OneHue62 + hi! link StorageClass OneHue62 + hi! link Structure OneHue62 + hi! link Typedef OneHue62 + hi! link Special OneHue2 call X('SpecialChar', '', '', '') call X('Tag', '', '', '') call X('Delimiter', '', '', '') @@ -440,341 +458,341 @@ if has('gui_running') || has('termguicolors') || &t_Co == 88 || &t_Co == 256 call X('Underlined', '', '', 'underline') call X('Ignore', '', '', '') call X('Error', s:hue_5, s:syntax_bg, 'bold') - call X('Todo', s:hue_3, s:syntax_bg, '') + hi! link Todo OneHue3 " }}} " Diff highlighting -------------------------------------------------------{{{ call X('DiffAdd', s:hue_4, s:visual_grey, '') call X('DiffChange', s:hue_6, s:visual_grey, '') call X('DiffDelete', s:hue_5, s:visual_grey, '') - call X('DiffText', s:hue_2, s:visual_grey, '') + hi! link DiffText OneHue2 call X('DiffAdded', s:hue_4, s:visual_grey, '') call X('DiffFile', s:hue_5, s:visual_grey, '') call X('DiffNewFile', s:hue_4, s:visual_grey, '') - call X('DiffLine', s:hue_2, s:visual_grey, '') + hi! link DiffLine OneHue2 call X('DiffRemoved', s:hue_5, s:visual_grey, '') " }}} " Asciidoc highlighting ---------------------------------------------------{{{ - call X('asciidocListingBlock', s:mono_2, '', '') + hi! link asciidocListingBlock OneMono2 " }}} " C/C++ highlighting ------------------------------------------------------{{{ - call X('cInclude', s:hue_3, '', '') - call X('cPreCondit', s:hue_3, '', '') - call X('cPreConditMatch', s:hue_3, '', '') - - call X('cType', s:hue_3, '', '') - call X('cStorageClass', s:hue_3, '', '') - call X('cStructure', s:hue_3, '', '') - call X('cOperator', s:hue_3, '', '') - call X('cStatement', s:hue_3, '', '') - call X('cTODO', s:hue_3, '', '') - call X('cConstant', s:hue_6, '', '') - call X('cSpecial', s:hue_1, '', '') - call X('cSpecialCharacter', s:hue_1, '', '') - call X('cString', s:hue_4, '', '') - - call X('cppType', s:hue_3, '', '') - call X('cppStorageClass', s:hue_3, '', '') - call X('cppStructure', s:hue_3, '', '') - call X('cppModifier', s:hue_3, '', '') - call X('cppOperator', s:hue_3, '', '') - call X('cppAccess', s:hue_3, '', '') - call X('cppStatement', s:hue_3, '', '') - call X('cppConstant', s:hue_5, '', '') - call X('cCppString', s:hue_4, '', '') + hi! link cInclude OneHue3 + hi! link cPreCondit OneHue3 + hi! link cPreConditMatch OneHue3 + + hi! link cType OneHue3 + hi! link cStorageClass OneHue3 + hi! link cStructure OneHue3 + hi! link cOperator OneHue3 + hi! link cStatement OneHue3 + hi! link cTODO OneHue3 + hi! link cConstant OneHue6 + hi! link cSpecial OneHue1 + hi! link cSpecialCharacter OneHue1 + hi! link cString OneHue4 + + hi! link cppType OneHue3 + hi! link cppStorageClass OneHue3 + hi! link cppStructure OneHue3 + hi! link cppModifier OneHue3 + hi! link cppOperator OneHue3 + hi! link cppAccess OneHue3 + hi! link cppStatement OneHue3 + hi! link cppConstant OneHue5 + hi! link cCppString OneHue4 " }}} " Cucumber highlighting ---------------------------------------------------{{{ - call X('cucumberGiven', s:hue_2, '', '') - call X('cucumberWhen', s:hue_2, '', '') - call X('cucumberWhenAnd', s:hue_2, '', '') - call X('cucumberThen', s:hue_2, '', '') - call X('cucumberThenAnd', s:hue_2, '', '') - call X('cucumberUnparsed', s:hue_6, '', '') + hi! link cucumberGiven OneHue2 + hi! link cucumberWhen OneHue2 + hi! link cucumberWhenAnd OneHue2 + hi! link cucumberThen OneHue2 + hi! link cucumberThenAnd OneHue2 + hi! link cucumberUnparsed OneHue6 call X('cucumberFeature', s:hue_5, '', 'bold') - call X('cucumberBackground', s:hue_3, '', 'bold') - call X('cucumberScenario', s:hue_3, '', 'bold') - call X('cucumberScenarioOutline', s:hue_3, '', 'bold') + hi! link cucumberBackground OneHue3 + hi! link cucumberScenario OneHue3 + hi! link cucumberScenarioOutline OneHue3 call X('cucumberTags', s:mono_3, '', 'bold') call X('cucumberDelimiter', s:mono_3, '', 'bold') " }}} " CSS/Sass highlighting ---------------------------------------------------{{{ - call X('cssAttrComma', s:hue_3, '', '') - call X('cssAttributeSelector', s:hue_4, '', '') - call X('cssBraces', s:mono_2, '', '') - call X('cssClassName', s:hue_6, '', '') - call X('cssClassNameDot', s:hue_6, '', '') - call X('cssDefinition', s:hue_3, '', '') - call X('cssFontAttr', s:hue_6, '', '') - call X('cssFontDescriptor', s:hue_3, '', '') - call X('cssFunctionName', s:hue_2, '', '') - call X('cssIdentifier', s:hue_2, '', '') - call X('cssImportant', s:hue_3, '', '') - call X('cssInclude', s:mono_1, '', '') - call X('cssIncludeKeyword', s:hue_3, '', '') - call X('cssMediaType', s:hue_6, '', '') - call X('cssProp', s:hue_1, '', '') - call X('cssPseudoClassId', s:hue_6, '', '') - call X('cssSelectorOp', s:hue_3, '', '') - call X('cssSelectorOp2', s:hue_3, '', '') - call X('cssStringQ', s:hue_4, '', '') - call X('cssStringQQ', s:hue_4, '', '') - call X('cssTagName', s:hue_5, '', '') - call X('cssAttr', s:hue_6, '', '') - - call X('sassAmpersand', s:hue_5, '', '') - call X('sassClass', s:hue_6_2, '', '') - call X('sassControl', s:hue_3, '', '') - call X('sassExtend', s:hue_3, '', '') - call X('sassFor', s:mono_1, '', '') - call X('sassProperty', s:hue_1, '', '') - call X('sassFunction', s:hue_1, '', '') - call X('sassId', s:hue_2, '', '') - call X('sassInclude', s:hue_3, '', '') - call X('sassMedia', s:hue_3, '', '') - call X('sassMediaOperators', s:mono_1, '', '') - call X('sassMixin', s:hue_3, '', '') - call X('sassMixinName', s:hue_2, '', '') - call X('sassMixing', s:hue_3, '', '') - - call X('scssSelectorName', s:hue_6_2, '', '') + hi! link cssAttrComma OneHue3 + hi! link cssAttributeSelector OneHue4 + hi! link cssBraces OneMono2 + hi! link cssClassName OneHue6 + hi! link cssClassNameDot OneHue6 + hi! link cssDefinition OneHue3 + hi! link cssFontAttr OneHue6 + hi! link cssFontDescriptor OneHue3 + hi! link cssFunctionName OneHue2 + hi! link cssIdentifier OneHue2 + hi! link cssImportant OneHue3 + hi! link cssInclude OneMono1 + hi! link cssIncludeKeyword OneHue3 + hi! link cssMediaType OneHue6 + hi! link cssProp OneHue1 + hi! link cssPseudoClassId OneHue6 + hi! link cssSelectorOp OneHue3 + hi! link cssSelectorOp2 OneHue3 + hi! link cssStringQ OneHue4 + hi! link cssStringQQ OneHue4 + hi! link cssTagName OneHue5 + hi! link cssAttr OneHue6 + + hi! link sassAmpersand OneHue5 + hi! link sassClass OneHue62 + hi! link sassControl OneHue3 + hi! link sassExtend OneHue3 + hi! link sassFor OneMono1 + hi! link sassProperty OneHue1 + hi! link sassFunction OneHue1 + hi! link sassId OneHue2 + hi! link sassInclude OneHue3 + hi! link sassMedia OneHue3 + hi! link sassMediaOperators OneMono1 + hi! link sassMixin OneHue3 + hi! link sassMixinName OneHue2 + hi! link sassMixing OneHue3 + + hi! link scssSelectorName OneHue62 " }}} " Elixir highlighting------------------------------------------------------{{{ - hi link elixirModuleDefine Define - call X('elixirAlias', s:hue_6_2, '', '') - call X('elixirAtom', s:hue_1, '', '') - call X('elixirBlockDefinition', s:hue_3, '', '') - call X('elixirModuleDeclaration', s:hue_6, '', '') - call X('elixirInclude', s:hue_5, '', '') - call X('elixirOperator', s:hue_6, '', '') + hi! link elixirModuleDefine Define + hi! link elixirAlias OneHue62 + hi! link elixirAtom OneHue1 + hi! link elixirBlockDefinition OneHue3 + hi! link elixirModuleDeclaration OneHue6 + hi! link elixirInclude OneHue5 + hi! link elixirOperator OneHue6 " }}} " Git and git related plugins highlighting --------------------------------{{{ - call X('gitcommitComment', s:mono_3, '', '') - call X('gitcommitUnmerged', s:hue_4, '', '') + hi! link gitcommitComment OneMono3 + hi! link gitcommitUnmerged OneHue4 call X('gitcommitOnBranch', '', '', '') - call X('gitcommitBranch', s:hue_3, '', '') - call X('gitcommitDiscardedType', s:hue_5, '', '') - call X('gitcommitSelectedType', s:hue_4, '', '') + hi! link gitcommitBranch OneHue3 + hi! link gitcommitDiscardedType OneHue5 + hi! link gitcommitSelectedType OneHue4 call X('gitcommitHeader', '', '', '') - call X('gitcommitUntrackedFile', s:hue_1, '', '') - call X('gitcommitDiscardedFile', s:hue_5, '', '') - call X('gitcommitSelectedFile', s:hue_4, '', '') - call X('gitcommitUnmergedFile', s:hue_6_2, '', '') + hi! link gitcommitUntrackedFile OneHue1 + hi! link gitcommitDiscardedFile OneHue5 + hi! link gitcommitSelectedFile OneHue4 + hi! link gitcommitUnmergedFile OneHue62 call X('gitcommitFile', '', '', '') - 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 - - call X('SignifySignAdd', s:hue_4, '', '') - call X('SignifySignChange', s:hue_6_2, '', '') - call X('SignifySignDelete', s:hue_5, '', '') - hi link GitGutterAdd SignifySignAdd - hi link GitGutterChange SignifySignChange - hi link GitGutterDelete SignifySignDelete - call X('diffAdded', s:hue_4, '', '') - call X('diffRemoved', s:hue_5, '', '') + 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 + + hi! link SignifySignAdd OneHue4 + hi! link SignifySignChange OneHue62 + hi! link SignifySignDelete OneHue5 + hi! link GitGutterAdd SignifySignAdd + hi! link GitGutterChange SignifySignChange + hi! link GitGutterDelete SignifySignDelete + hi! link diffAdded OneHue4 + hi! link diffRemoved OneHue5 " }}} " Go highlighting ---------------------------------------------------------{{{ - call X('goDeclaration', s:hue_3, '', '') - call X('goField', s:hue_5, '', '') - call X('goMethod', s:hue_1, '', '') - call X('goType', s:hue_3, '', '') - call X('goUnsignedInts', s:hue_1, '', '') + hi! link goDeclaration OneHue3 + hi! link goField OneHue5 + hi! link goMethod OneHue1 + hi! link goType OneHue3 + hi! link goUnsignedInts OneHue1 " }}} " Haskell highlighting ----------------------------------------------------{{{ - call X('haskellDeclKeyword', s:hue_2, '', '') - call X('haskellType', s:hue_4, '', '') - call X('haskellWhere', s:hue_5, '', '') - call X('haskellImportKeywords', s:hue_2, '', '') - call X('haskellOperators', s:hue_5, '', '') - call X('haskellDelimiter', s:hue_2, '', '') - call X('haskellIdentifier', s:hue_6, '', '') - call X('haskellKeyword', s:hue_5, '', '') - call X('haskellNumber', s:hue_1, '', '') - call X('haskellString', s:hue_1, '', '') + hi! link haskellDeclKeyword OneHue2 + hi! link haskellType OneHue4 + hi! link haskellWhere OneHue5 + hi! link haskellImportKeywords OneHue2 + hi! link haskellOperators OneHue5 + hi! link haskellDelimiter OneHue2 + hi! link haskellIdentifier OneHue6 + hi! link haskellKeyword OneHue5 + hi! link haskellNumber OneHue1 + hi! link haskellString OneHue1 "}}} " HTML highlighting -------------------------------------------------------{{{ - call X('htmlArg', s:hue_6, '', '') - call X('htmlTagName', s:hue_5, '', '') - call X('htmlTagN', s:hue_5, '', '') - call X('htmlSpecialTagName', s:hue_5, '', '') - call X('htmlTag', s:mono_2, '', '') - call X('htmlEndTag', s:mono_2, '', '') + hi! link htmlArg OneHue6 + hi! link htmlTagName OneHue5 + hi! link htmlTagN OneHue5 + hi! link htmlSpecialTagName OneHue5 + hi! link htmlTag OneMono2 + hi! link htmlEndTag OneMono2 call X('MatchTag', s:hue_5, s:syntax_cursor, 'underline,bold') " }}} " JavaScript highlighting -------------------------------------------------{{{ - call X('coffeeString', s:hue_4, '', '') - - call X('javaScriptBraces', s:mono_2, '', '') - call X('javaScriptFunction', s:hue_3, '', '') - call X('javaScriptIdentifier', s:hue_3, '', '') - call X('javaScriptNull', s:hue_6, '', '') - call X('javaScriptNumber', s:hue_6, '', '') - call X('javaScriptRequire', s:hue_1, '', '') - call X('javaScriptReserved', s:hue_3, '', '') + hi! link coffeeString OneHue4 + + hi! link javaScriptBraces OneMono2 + hi! link javaScriptFunction OneHue3 + hi! link javaScriptIdentifier OneHue3 + hi! link javaScriptNull OneHue6 + hi! link javaScriptNumber OneHue6 + hi! link javaScriptRequire OneHue1 + hi! link javaScriptReserved OneHue3 " https://github.com/pangloss/vim-javascript - call X('jsArrowFunction', s:hue_3, '', '') - call X('jsBraces', s:mono_2, '', '') - call X('jsClassBraces', s:mono_2, '', '') - call X('jsClassKeywords', s:hue_3, '', '') - call X('jsDocParam', s:hue_2, '', '') - call X('jsDocTags', s:hue_3, '', '') - call X('jsFuncBraces', s:mono_2, '', '') - call X('jsFuncCall', s:hue_2, '', '') - call X('jsFuncParens', s:mono_2, '', '') - call X('jsFunction', s:hue_3, '', '') - call X('jsGlobalObjects', s:hue_6_2, '', '') - call X('jsModuleWords', s:hue_3, '', '') - call X('jsModules', s:hue_3, '', '') - call X('jsNoise', s:mono_2, '', '') - call X('jsNull', s:hue_6, '', '') - call X('jsOperator', s:hue_3, '', '') - call X('jsParens', s:mono_2, '', '') - call X('jsStorageClass', s:hue_3, '', '') - call X('jsTemplateBraces', s:hue_5_2, '', '') - call X('jsTemplateVar', s:hue_4, '', '') - call X('jsThis', s:hue_5, '', '') - call X('jsUndefined', s:hue_6, '', '') - call X('jsObjectValue', s:hue_2, '', '') - call X('jsObjectKey', s:hue_1, '', '') - call X('jsReturn', s:hue_3, '', '') + hi! link jsArrowFunction OneHue3 + hi! link jsBraces OneMono2 + hi! link jsClassBraces OneMono2 + hi! link jsClassKeywords OneHue3 + hi! link jsDocParam OneHue2 + hi! link jsDocTags OneHue3 + hi! link jsFuncBraces OneMono2 + hi! link jsFuncCall OneHue2 + hi! link jsFuncParens OneMono2 + hi! link jsFunction OneHue3 + hi! link jsGlobalObjects OneHue62 + hi! link jsModuleWords OneHue3 + hi! link jsModules OneHue3 + hi! link jsNoise OneMono2 + hi! link jsNull OneHue6 + hi! link jsOperator OneHue3 + hi! link jsParens OneMono2 + hi! link jsStorageClass OneHue3 + hi! link jsTemplateBraces OneHue52 + hi! link jsTemplateVar OneHue4 + hi! link jsThis OneHue5 + hi! link jsUndefined OneHue6 + hi! link jsObjectValue OneHue2 + hi! link jsObjectKey OneHue1 + hi! link jsReturn OneHue3 " https://github.com/othree/yajs.vim - call X('javascriptArrowFunc', s:hue_3, '', '') - call X('javascriptClassExtends', s:hue_3, '', '') - call X('javascriptClassKeyword', s:hue_3, '', '') - call X('javascriptDocNotation', s:hue_3, '', '') - call X('javascriptDocParamName', s:hue_2, '', '') - call X('javascriptDocTags', s:hue_3, '', '') - call X('javascriptEndColons', s:mono_3, '', '') - call X('javascriptExport', s:hue_3, '', '') - call X('javascriptFuncArg', s:mono_1, '', '') - call X('javascriptFuncKeyword', s:hue_3, '', '') - call X('javascriptIdentifier', s:hue_5, '', '') - call X('javascriptImport', s:hue_3, '', '') - call X('javascriptObjectLabel', s:mono_1, '', '') - call X('javascriptOpSymbol', s:hue_1, '', '') - call X('javascriptOpSymbols', s:hue_1, '', '') - call X('javascriptPropertyName', s:hue_4, '', '') - call X('javascriptTemplateSB', s:hue_5_2, '', '') - call X('javascriptVariable', s:hue_3, '', '') + hi! link javascriptArrowFunc OneHue3 + hi! link javascriptClassExtends OneHue3 + hi! link javascriptClassKeyword OneHue3 + hi! link javascriptDocNotation OneHue3 + hi! link javascriptDocParamName OneHue2 + hi! link javascriptDocTags OneHue3 + hi! link javascriptEndColons OneMono3 + hi! link javascriptExport OneHue3 + hi! link javascriptFuncArg OneMono1 + hi! link javascriptFuncKeyword OneHue3 + hi! link javascriptIdentifier OneHue5 + hi! link javascriptImport OneHue3 + hi! link javascriptObjectLabel OneMono1 + hi! link javascriptOpSymbol OneHue1 + hi! link javascriptOpSymbols OneHue1 + hi! link javascriptPropertyName OneHue4 + hi! link javascriptTemplateSB OneHue52 + hi! link javascriptVariable OneHue3 " }}} " JSON highlighting -------------------------------------------------------{{{ - call X('jsonCommentError', s:mono_1, '', '' ) - call X('jsonKeyword', s:hue_5, '', '' ) - call X('jsonQuote', s:mono_3, '', '' ) + hi! link jsonCommentError OneMono1 + hi! link jsonKeyword OneHue5 + hi! link jsonQuote OneMono3 call X('jsonTrailingCommaError', s:hue_5, '', 'reverse' ) call X('jsonMissingCommaError', s:hue_5, '', 'reverse' ) call X('jsonNoQuotesError', s:hue_5, '', 'reverse' ) call X('jsonNumError', s:hue_5, '', 'reverse' ) - call X('jsonString', s:hue_4, '', '' ) - call X('jsonBoolean', s:hue_3, '', '' ) - call X('jsonNumber', s:hue_6, '', '' ) + hi! link jsonString OneHue4 + hi! link jsonBoolean OneHue3 + hi! link jsonNumber OneHue6 call X('jsonStringSQError', s:hue_5, '', 'reverse' ) call X('jsonSemicolonError', s:hue_5, '', 'reverse' ) " }}} " Markdown highlighting ---------------------------------------------------{{{ - call X('markdownUrl', s:mono_3, '', '') + hi! link markdownUrl OneMono3 call X('markdownBold', s:hue_6, '', 'bold') call X('markdownItalic', s:hue_6, '', 'bold') - call X('markdownCode', s:hue_4, '', '') - call X('markdownCodeBlock', s:hue_5, '', '') - call X('markdownCodeDelimiter', s:hue_4, '', '') - call X('markdownHeadingDelimiter', s:hue_5_2, '', '') - call X('markdownH1', s:hue_5, '', '') - call X('markdownH2', s:hue_5, '', '') - call X('markdownH3', s:hue_5, '', '') - call X('markdownH3', s:hue_5, '', '') - call X('markdownH4', s:hue_5, '', '') - call X('markdownH5', s:hue_5, '', '') - call X('markdownH6', s:hue_5, '', '') - call X('markdownListMarker', s:hue_5, '', '') + hi! link markdownCode OneHue4 + hi! link markdownCodeBlock OneHue5 + hi! link markdownCodeDelimiter OneHue4 + hi! link markdownHeadingDelimiter OneHue52 + hi! link markdownH1 OneHue5 + hi! link markdownH2 OneHue5 + hi! link markdownH3 OneHue5 + hi! link markdownH3 OneHue5 + hi! link markdownH4 OneHue5 + hi! link markdownH5 OneHue5 + hi! link markdownH6 OneHue5 + hi! link markdownListMarker OneHue5 " }}} " PHP highlighting --------------------------------------------------------{{{ - call X('phpClass', s:hue_6_2, '', '') - call X('phpFunction', s:hue_2, '', '') - call X('phpFunctions', s:hue_2, '', '') - call X('phpInclude', s:hue_3, '', '') - call X('phpKeyword', s:hue_3, '', '') - call X('phpParent', s:mono_3, '', '') - call X('phpType', s:hue_3, '', '') - call X('phpSuperGlobals', s:hue_5, '', '') + hi! link phpClass OneHue62 + hi! link phpFunction OneHue2 + hi! link phpFunctions OneHue2 + hi! link phpInclude OneHue3 + hi! link phpKeyword OneHue3 + hi! link phpParent OneMono3 + hi! link phpType OneHue3 + hi! link phpSuperGlobals OneHue5 " }}} " Pug (Formerly Jade) highlighting ----------------------------------------{{{ - call X('pugAttributesDelimiter', s:hue_6, '', '') - call X('pugClass', s:hue_6, '', '') + hi! link pugAttributesDelimiter OneHue6 + hi! link pugClass OneHue6 call X('pugDocType', s:mono_3, '', s:italic) - call X('pugTag', s:hue_5, '', '') + hi! link pugTag OneHue5 " }}} " PureScript highlighting -------------------------------------------------{{{ - call X('purescriptKeyword', s:hue_3, '', '') - call X('purescriptModuleName', s:syntax_fg, '', '') - call X('purescriptIdentifier', s:syntax_fg, '', '') - call X('purescriptType', s:hue_6_2, '', '') - call X('purescriptTypeVar', s:hue_5, '', '') - call X('purescriptConstructor', s:hue_5, '', '') - call X('purescriptOperator', s:syntax_fg, '', '') + hi! link purescriptKeyword OneHue3 + hi! link purescriptModuleName OneSyntaxFg + hi! link purescriptIdentifier OneSyntaxFg + hi! link purescriptType OneHue62 + hi! link purescriptTypeVar OneHue5 + hi! link purescriptConstructor OneHue5 + hi! link purescriptOperator OneSyntaxFg " }}} " Python highlighting -----------------------------------------------------{{{ - call X('pythonImport', s:hue_3, '', '') - call X('pythonBuiltin', s:hue_1, '', '') - call X('pythonStatement', s:hue_3, '', '') - call X('pythonParam', s:hue_6, '', '') - call X('pythonEscape', s:hue_5, '', '') + hi! link pythonImport OneHue3 + hi! link pythonBuiltin OneHue1 + hi! link pythonStatement OneHue3 + hi! link pythonParam OneHue6 + hi! link pythonEscape OneHue5 call X('pythonSelf', s:mono_2, '', s:italic) - call X('pythonClass', s:hue_2, '', '') - call X('pythonOperator', s:hue_3, '', '') - call X('pythonEscape', s:hue_5, '', '') - call X('pythonFunction', s:hue_2, '', '') - call X('pythonKeyword', s:hue_2, '', '') - call X('pythonModule', s:hue_3, '', '') - call X('pythonStringDelimiter', s:hue_4, '', '') - call X('pythonSymbol', s:hue_1, '', '') + hi! link pythonClass OneHue2 + hi! link pythonOperator OneHue3 + hi! link pythonEscape OneHue5 + hi! link pythonFunction OneHue2 + hi! link pythonKeyword OneHue2 + hi! link pythonModule OneHue3 + hi! link pythonStringDelimiter OneHue4 + hi! link pythonSymbol OneHue1 " }}} " Ruby highlighting -------------------------------------------------------{{{ - call X('rubyBlock', s:hue_3, '', '') - call X('rubyBlockParameter', s:hue_5, '', '') - call X('rubyBlockParameterList', s:hue_5, '', '') - call X('rubyCapitalizedMethod', s:hue_3, '', '') - call X('rubyClass', s:hue_3, '', '') - call X('rubyConstant', s:hue_6_2, '', '') - call X('rubyControl', s:hue_3, '', '') - call X('rubyDefine', s:hue_3, '', '') - call X('rubyEscape', s:hue_5, '', '') - call X('rubyFunction', s:hue_2, '', '') - call X('rubyGlobalVariable', s:hue_5, '', '') - call X('rubyInclude', s:hue_2, '', '') - call X('rubyIncluderubyGlobalVariable', s:hue_5, '', '') - call X('rubyInstanceVariable', s:hue_5, '', '') - call X('rubyInterpolation', s:hue_1, '', '') - call X('rubyInterpolationDelimiter', s:hue_5, '', '') - call X('rubyKeyword', s:hue_2, '', '') - call X('rubyModule', s:hue_3, '', '') - call X('rubyPseudoVariable', s:hue_5, '', '') - call X('rubyRegexp', s:hue_1, '', '') - call X('rubyRegexpDelimiter', s:hue_1, '', '') - call X('rubyStringDelimiter', s:hue_4, '', '') - call X('rubySymbol', s:hue_1, '', '') + hi! link rubyBlock OneHue3 + hi! link rubyBlockParameter OneHue5 + hi! link rubyBlockParameterList OneHue5 + hi! link rubyCapitalizedMethod OneHue3 + hi! link rubyClass OneHue3 + hi! link rubyConstant OneHue62 + hi! link rubyControl OneHue3 + hi! link rubyDefine OneHue3 + hi! link rubyEscape OneHue5 + hi! link rubyFunction OneHue2 + hi! link rubyGlobalVariable OneHue5 + hi! link rubyInclude OneHue2 + hi! link rubyIncluderubyGlobalVariable OneHue5 + hi! link rubyInstanceVariable OneHue5 + hi! link rubyInterpolation OneHue1 + hi! link rubyInterpolationDelimiter OneHue5 + hi! link rubyKeyword OneHue2 + hi! link rubyModule OneHue3 + hi! link rubyPseudoVariable OneHue5 + hi! link rubyRegexp OneHue1 + hi! link rubyRegexpDelimiter OneHue1 + hi! link rubyStringDelimiter OneHue4 + hi! link rubySymbol OneHue1 " }}} " Spelling highlighting ---------------------------------------------------{{{ @@ -785,61 +803,61 @@ if has('gui_running') || has('termguicolors') || &t_Co == 88 || &t_Co == 256 " }}} " Vim highlighting --------------------------------------------------------{{{ - call X('vimCommand', s:hue_3, '', '') + hi! link vimCommand OneHue3 call X('vimCommentTitle', s:mono_3, '', 'bold') - call X('vimFunction', s:hue_1, '', '') - call X('vimFuncName', s:hue_3, '', '') - call X('vimHighlight', s:hue_2, '', '') + hi! link vimFunction OneHue1 + hi! link vimFuncName OneHue3 + hi! link vimHighlight OneHue2 call X('vimLineComment', s:mono_3, '', s:italic) - call X('vimParenSep', s:mono_2, '', '') - call X('vimSep', s:mono_2, '', '') - call X('vimUserFunc', s:hue_1, '', '') - call X('vimVar', s:hue_5, '', '') + hi! link vimParenSep OneMono2 + hi! link vimSep OneMono2 + hi! link vimUserFunc OneHue1 + hi! link vimVar OneHue5 " }}} " XML highlighting --------------------------------------------------------{{{ - call X('xmlAttrib', s:hue_6_2, '', '') - call X('xmlEndTag', s:hue_5, '', '') - call X('xmlTag', s:hue_5, '', '') - call X('xmlTagName', s:hue_5, '', '') + hi! link xmlAttrib OneHue62 + hi! link xmlEndTag OneHue5 + hi! link xmlTag OneHue5 + hi! link xmlTagName OneHue5 " }}} " ZSH highlighting --------------------------------------------------------{{{ - call X('zshCommands', s:syntax_fg, '', '') - call X('zshDeref', s:hue_5, '', '') - call X('zshShortDeref', s:hue_5, '', '') - call X('zshFunction', s:hue_1, '', '') - call X('zshKeyword', s:hue_3, '', '') - call X('zshSubst', s:hue_5, '', '') - call X('zshSubstDelim', s:mono_3, '', '') - call X('zshTypes', s:hue_3, '', '') - call X('zshVariableDef', s:hue_6, '', '') + hi! link zshCommands OneSyntaxFg + hi! link zshDeref OneHue5 + hi! link zshShortDeref OneHue5 + hi! link zshFunction OneHue1 + hi! link zshKeyword OneHue3 + hi! link zshSubst OneHue5 + hi! link zshSubstDelim OneMono3 + hi! link zshTypes OneHue3 + hi! link zshVariableDef OneHue6 " }}} " Rust highlighting -------------------------------------------------------{{{ call X('rustExternCrate', s:hue_5, '', 'bold') - call X('rustIdentifier', s:hue_2, '', '') - call X('rustDeriveTrait', s:hue_4, '', '') - call X('SpecialComment', s:mono_3, '', '') - call X('rustCommentLine', s:mono_3, '', '') - call X('rustCommentLineDoc', s:mono_3, '', '') - call X('rustCommentLineDocError', s:mono_3, '', '') - call X('rustCommentBlock', s:mono_3, '', '') - call X('rustCommentBlockDoc', s:mono_3, '', '') - call X('rustCommentBlockDocError', s:mono_3, '', '') + hi! link rustIdentifier OneHue2 + hi! link rustDeriveTrait OneHue4 + hi! link SpecialComment OneMono3 + hi! link rustCommentLine OneMono3 + hi! link rustCommentLineDoc OneMono3 + hi! link rustCommentLineDocError OneMono3 + hi! link rustCommentBlock OneMono3 + hi! link rustCommentBlockDoc OneMono3 + hi! link rustCommentBlockDocError OneMono3 " }}} " man highlighting --------------------------------------------------------{{{ - hi link manTitle String - call X('manFooter', s:mono_3, '', '') + hi! link manTitle String + hi! link manFooter OneMono3 " }}} " ALE (Asynchronous Lint Engine) highlighting -----------------------------{{{ - call X('ALEWarningSign', s:hue_6_2, '', '') - call X('ALEErrorSign', s:hue_5, '', '') + hi! link ALEWarningSign OneHue62 + hi! link ALEErrorSign OneHue5 - " Neovim NERDTree Background fix ------------------------------------------{{{ + " Neovim NERDTree Background fix ------------------------------------------{{{ call X('NERDTreeFile', s:syntax_fg, '', '') " }}} From 49cbb10cfcf570c3547f98baac0719e16ecd6507 Mon Sep 17 00:00:00 2001 From: laggardkernel Date: Wed, 10 Apr 2019 21:00:25 +0800 Subject: [PATCH 2/2] Convert NERDTreeFile highlight to hi link style --- colors/one.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colors/one.vim b/colors/one.vim index f54e9d6..bbd35d5 100644 --- a/colors/one.vim +++ b/colors/one.vim @@ -858,7 +858,7 @@ if has('gui_running') || has('termguicolors') || &t_Co == 88 || &t_Co == 256 " Neovim NERDTree Background fix ------------------------------------------{{{ - call X('NERDTreeFile', s:syntax_fg, '', '') + hi! link NERDTreeFile OneSyntaxFg " }}} " Neovim Terminal Colors --------------------------------------------------{{{