Mercurial > ec-dotfiles
diff vendor/vim-colors/codedark.vim @ 704:1e0f578f6752
Update vendor and add support for vim packs
author | nanaya <me@nanaya.net> |
---|---|
date | Sun, 18 Dec 2022 20:06:46 +0900 |
parents | 17cacf387f7c |
children |
line wrap: on
line diff
--- a/vendor/vim-colors/codedark.vim Sun Dec 18 19:29:43 2022 +0900 +++ b/vendor/vim-colors/codedark.vim Sun Dec 18 20:06:46 2022 +0900 @@ -30,6 +30,10 @@ exec "hi " . a:group . " guisp=" . a:sp.gui endif endfun +" Choose old or new name for Treesitter groups depending on Neovim version +fun! <sid>hiTS(g_new, g_old, fg, bg, attr, sp) + call <sid>hi(has("nvim-0.8.0")? a:g_new : a:g_old, a:fg, a:bg, a:attr, a:sp) +endfun " ------------------ " Color definitions: @@ -106,7 +110,7 @@ let s:cdDiffBlueLight = {'gui': '#87d7ff', 'cterm': s:cterm0C, 'cterm256': '117'} let s:cdDiffBlue = {'gui': '#005f87', 'cterm': s:cterm0D, 'cterm256': '24'} -let s:cdSearchCurrent = {'gui': '#4B5632', 'cterm': s:cterm09, 'cterm256': '58'} +let s:cdSearchCurrent = {'gui': '#4B5632', 'cterm': s:cterm09, 'cterm256': '58'} let s:cdSearch = {'gui': '#264F78', 'cterm': s:cterm03, 'cterm256': '24'} " Syntax colors: @@ -243,61 +247,61 @@ " Neovim Treesitter: -call <sid>hi('TSError', s:cdRed, {}, 'none', {}) -call <sid>hi('TSPunctDelimiter', s:cdFront, {}, 'none', {}) -call <sid>hi('TSPunctBracket', s:cdFront, {}, 'none', {}) -call <sid>hi('TSPunctSpecial', s:cdFront, {}, 'none', {}) +call <sid>hiTS('@error', 'TSError', s:cdRed, {}, 'none', {}) +call <sid>hiTS('@punctuation.delimiter', 'TSPunctDelimiter', s:cdFront, {}, 'none', {}) +call <sid>hiTS('@punctuation.bracket', 'TSPunctBracket', s:cdFront, {}, 'none', {}) +call <sid>hiTS('@punctuation.special', 'TSPunctSpecial', s:cdFront, {}, 'none', {}) " Constant -call <sid>hi('TSConstant', s:cdYellow, {}, 'none', {}) -call <sid>hi('TSConstBuiltin', s:cdBlue, {}, 'none', {}) -call <sid>hi('TSConstMacro', s:cdBlueGreen, {}, 'none', {}) -call <sid>hi('TSStringRegex', s:cdOrange, {}, 'none', {}) -call <sid>hi('TSString', s:cdOrange, {}, 'none', {}) -call <sid>hi('TSStringEscape', s:cdYellowOrange, {}, 'none', {}) -call <sid>hi('TSCharacter', s:cdOrange, {}, 'none', {}) -call <sid>hi('TSNumber', s:cdLightGreen, {}, 'none', {}) -call <sid>hi('TSBoolean', s:cdBlue, {}, 'none', {}) -call <sid>hi('TSFloat', s:cdLightGreen, {}, 'none', {}) -call <sid>hi('TSAnnotation', s:cdYellow, {}, 'none', {}) -call <sid>hi('TSAttribute', s:cdBlueGreen, {}, 'none', {}) -call <sid>hi('TSNamespace', s:cdBlueGreen, {}, 'none', {}) +call <sid>hiTS('@constant', 'TSConstant', s:cdYellow, {}, 'none', {}) +call <sid>hiTS('@constant.builtin', 'TSConstBuiltin', s:cdBlue, {}, 'none', {}) +call <sid>hiTS('@constant.macro', 'TSConstMacro', s:cdBlueGreen, {}, 'none', {}) +call <sid>hiTS('@string.regex', 'TSStringRegex', s:cdOrange, {}, 'none', {}) +call <sid>hiTS('@string', 'TSString', s:cdOrange, {}, 'none', {}) +call <sid>hiTS('@string.escape', 'TSStringEscape', s:cdYellowOrange, {}, 'none', {}) +call <sid>hiTS('@character', 'TSCharacter', s:cdOrange, {}, 'none', {}) +call <sid>hiTS('@number', 'TSNumber', s:cdLightGreen, {}, 'none', {}) +call <sid>hiTS('@boolean', 'TSBoolean', s:cdBlue, {}, 'none', {}) +call <sid>hiTS('@float', 'TSFloat', s:cdLightGreen, {}, 'none', {}) +call <sid>hiTS('@annotation', 'TSAnnotation', s:cdYellow, {}, 'none', {}) +call <sid>hiTS('@attribute', 'TSAttribute', s:cdBlueGreen, {}, 'none', {}) +call <sid>hiTS('@namespace', 'TSNamespace', s:cdBlueGreen, {}, 'none', {}) " Functions -call <sid>hi('TSFuncBuiltin', s:cdYellow, {}, 'none', {}) -call <sid>hi('TSFunction', s:cdYellow, {}, 'none', {}) -call <sid>hi('TSFuncMacro', s:cdYellow, {}, 'none', {}) -call <sid>hi('TSParameter', s:cdLightBlue, {}, 'none', {}) -call <sid>hi('TSParameterReference', s:cdLightBlue, {}, 'none', {}) -call <sid>hi('TSMethod', s:cdYellow, {}, 'none', {}) -call <sid>hi('TSField', s:cdLightBlue, {}, 'none', {}) -call <sid>hi('TSProperty', s:cdLightBlue, {}, 'none', {}) -call <sid>hi('TSConstructor', s:cdBlueGreen, {}, 'none', {}) +call <sid>hiTS('@function.builtin', 'TSFuncBuiltin', s:cdYellow, {}, 'none', {}) +call <sid>hiTS('@function', 'TSFunction', s:cdYellow, {}, 'none', {}) +call <sid>hiTS('@function.macro', 'TSFuncMacro', s:cdYellow, {}, 'none', {}) +call <sid>hiTS('@parameter', 'TSParameter', s:cdLightBlue, {}, 'none', {}) +call <sid>hiTS('@parameter.reference', 'TSParameterReference', s:cdLightBlue, {}, 'none', {}) +call <sid>hiTS('@method', 'TSMethod', s:cdYellow, {}, 'none', {}) +call <sid>hiTS('@field', 'TSField', s:cdLightBlue, {}, 'none', {}) +call <sid>hiTS('@property', 'TSProperty', s:cdLightBlue, {}, 'none', {}) +call <sid>hiTS('@constructor', 'TSConstructor', s:cdBlueGreen, {}, 'none', {}) " Keywords -call <sid>hi('TSConditional', s:cdPink, {}, 'none', {}) -call <sid>hi('TSRepeat', s:cdPink, {}, 'none', {}) -call <sid>hi('TSLabel', s:cdLightBlue, {}, 'none', {}) -call <sid>hi('TSKeyword', s:cdBlue, {}, 'none', {}) -call <sid>hi('TSKeywordFunction', s:cdBlue, {}, 'none', {}) -call <sid>hi('TSKeywordOperator', s:cdBlue, {}, 'none', {}) -call <sid>hi('TSOperator', s:cdFront, {}, 'none', {}) -call <sid>hi('TSException', s:cdPink, {}, 'none', {}) -call <sid>hi('TSType', s:cdBlueGreen, {}, 'none', {}) -call <sid>hi('TSTypeBuiltin', s:cdBlue, {}, 'none', {}) +call <sid>hiTS('@conditional', 'TSConditional', s:cdPink, {}, 'none', {}) +call <sid>hiTS('@repeat', 'TSRepeat', s:cdPink, {}, 'none', {}) +call <sid>hiTS('@label', 'TSLabel', s:cdLightBlue, {}, 'none', {}) +call <sid>hiTS('@keyword', 'TSKeyword', s:cdBlue, {}, 'none', {}) +call <sid>hiTS('@keyword.function', 'TSKeywordFunction', s:cdBlue, {}, 'none', {}) +call <sid>hiTS('@keyword.operator', 'TSKeywordOperator', s:cdBlue, {}, 'none', {}) +call <sid>hiTS('@operator', 'TSOperator', s:cdFront, {}, 'none', {}) +call <sid>hiTS('@exception', 'TSException', s:cdPink, {}, 'none', {}) +call <sid>hiTS('@type', 'TSType', s:cdBlueGreen, {}, 'none', {}) +call <sid>hiTS('@type.builtin', 'TSTypeBuiltin', s:cdBlue, {}, 'none', {}) call <sid>hi('TSStructure', s:cdLightBlue, {}, 'none', {}) -call <sid>hi('TSInclude', s:cdPink, {}, 'none', {}) +call <sid>hiTS('@include', 'TSInclude', s:cdPink, {}, 'none', {}) " Variable -call <sid>hi('TSVariable', s:cdLightBlue, {}, 'none', {}) -call <sid>hi('TSVariableBuiltin', s:cdLightBlue, {}, 'none', {}) +call <sid>hiTS('@variable', 'TSVariable', s:cdLightBlue, {}, 'none', {}) +call <sid>hiTS('@variable.builtin', 'TSVariableBuiltin', s:cdLightBlue, {}, 'none', {}) " Text -call <sid>hi('TSText', s:cdYellowOrange, {}, 'none', {}) -call <sid>hi('TSStrong', s:cdYellowOrange, {}, 'none', {}) -call <sid>hi('TSEmphasis', s:cdYellowOrange, {}, 'none', {}) -call <sid>hi('TSUnderline', s:cdYellowOrange, {}, 'none', {}) -call <sid>hi('TSTitle', s:cdYellowOrange, {}, 'none', {}) -call <sid>hi('TSLiteral', s:cdYellowOrange, {}, 'none', {}) -call <sid>hi('TSURI', s:cdYellowOrange, {}, 'none', {}) +call <sid>hiTS('@text', 'TSText', s:cdYellowOrange, {}, 'none', {}) +call <sid>hiTS('@text.strong', 'TSStrong', s:cdYellowOrange, {}, 'none', {}) +call <sid>hiTS('@text.emphasis', 'TSEmphasis', s:cdYellowOrange, {}, 'none', {}) +call <sid>hiTS('@text.underline', 'TSUnderline', s:cdYellowOrange, {}, 'none', {}) +call <sid>hiTS('@text.title', 'TSTitle', s:cdYellowOrange, {}, 'none', {}) +call <sid>hiTS('@text.literal', 'TSLiteral', s:cdYellowOrange, {}, 'none', {}) +call <sid>hiTS('@text.uri', 'TSURI', s:cdYellowOrange, {}, 'none', {}) " Tags -call <sid>hi('TSTag', s:cdBlue, {}, 'none', {}) -call <sid>hi('TSTagDelimiter', s:cdGray, {}, 'none', {}) +call <sid>hiTS('@tag', 'TSTag', s:cdBlue, {}, 'none', {}) +call <sid>hiTS('@tag.delimiter', 'TSTagDelimiter', s:cdGray, {}, 'none', {}) " Markdown: call <sid>hi('markdownH1', s:cdBlue, {}, 'bold', {}) @@ -616,7 +620,7 @@ call <sid>hi('CocExplorerIndentLine', s:cdCursorDark, {}, 'none', {}) " nvim-cmp -call <sid>hi('CmpItemAbbrDeprecated', s:cdGray, {}, 'strikethrough', {}) +call <sid>hi('CmpItemAbbrDeprecated', s:cdGray, {}, 'none', {}) call <sid>hi('CmpItemAbbrMatch', s:cdBlue, {}, 'none', {}) call <sid>hi('CmpItemAbbrMatchFuzzy', s:cdBlue, {}, 'none', {}) call <sid>hi('CmpItemKindVariable', s:cdLightBlue, {}, 'none', {})