From 766f14f098b6ce9a257e9317ec922bd90b6d1a91 Mon Sep 17 00:00:00 2001 From: rick Date: Thu, 31 Mar 2022 19:17:47 +0200 Subject: [PATCH] update colorscheme --- autoload/airline/themes/codedark.vim | 2 +- colors/codedark.vim | 155 ++++++++++++++++++++++++++- 2 files changed, 153 insertions(+), 4 deletions(-) diff --git a/autoload/airline/themes/codedark.vim b/autoload/airline/themes/codedark.vim index ec393d8..ef8e7b5 100644 --- a/autoload/airline/themes/codedark.vim +++ b/autoload/airline/themes/codedark.vim @@ -38,7 +38,7 @@ elseif !exists("g:codedark_term256") let g:codedark_term256=0 endif -let s:cdFront = {'gui': '#FFFFFF', 'cterm': (g:codedark_term256 ? '15' : s:cterm07)} +let s:cdFront = {'gui': '#FFFFFF', 'cterm': (g:codedark_term256 ? '231' : s:cterm07)} let s:cdFrontGray = {'gui': '#D4D4D4', 'cterm': (g:codedark_term256 ? '188' : s:cterm05)} let s:cdBack = {'gui': '#1E1E1E', 'cterm': (g:codedark_term256 ? '234' : s:cterm00)} let s:cdSelection = {'gui': '#264F78', 'cterm': (g:codedark_term256 ? '24' : s:cterm01)} diff --git a/colors/codedark.vim b/colors/codedark.vim index 169f591..e67827b 100644 --- a/colors/codedark.vim +++ b/colors/codedark.vim @@ -107,6 +107,11 @@ if !exists("g:codedark_conservative") let g:codedark_conservative=0 endif +" Italicized comments +if !exists("g:codedark_italics") + let g:codedark_italics=0 +endif + let s:cdGray = {'gui': '#808080', 'cterm': s:cterm04, 'cterm256': '08'} let s:cdViolet = {'gui': '#646695', 'cterm': s:cterm04, 'cterm256': '60'} let s:cdBlue = {'gui': '#569CD6', 'cterm': s:cterm0D, 'cterm256': '75'} @@ -125,6 +130,7 @@ let s:cdYellow = {'gui': '#DCDCAA', 'cterm': s:cterm0A, 'cterm256': '187'} if g:codedark_conservative | let s:cdYellow = s:cdFront | endif let s:cdPink = {'gui': '#C586C0', 'cterm': s:cterm0E, 'cterm256': '176'} if g:codedark_conservative | let s:cdPink = s:cdBlue | endif +let s:cdSilver = {'gui': '#C0C0C0', 'cterm': s:cterm05, 'cterm256': '7'} " Vim editor colors " hi(GROUP, FOREGROUND, BACKGROUND, ATTRIBUTE, SPECIAL) @@ -134,7 +140,7 @@ call hi('Cursor', s:cdCursorDark, s:cdCursorLight, 'none', {}) call hi('CursorLine', {}, s:cdCursorDarkDark, 'none', {}) call hi('CursorColumn', {}, s:cdCursorDarkDark, 'none', {}) call hi('Directory', s:cdBlue, s:cdBack, 'none', {}) -call hi('DiffAdd', {}, s:cdDiffGreenDark, 'none', {}) +call hi('DiffAdd', {}, s:cdDiffGreenLight, 'none', {}) call hi('DiffChange', {}, s:cdDiffRedDark, 'none', {}) call hi('DiffDelete', {}, s:cdDiffRedLight, 'none', {}) call hi('DiffText', {}, s:cdDiffRedLight, 'none', {}) @@ -169,7 +175,12 @@ call hi('VisualNOS', s:cdNone, s:cdSelection, 'none', {}) call hi('WarningMsg', s:cdOrange, s:cdBack, 'none', {}) call hi('WildMenu', s:cdNone, s:cdSelection, 'none', {}) -call hi('Comment', s:cdGreen, {}, 'none', {}) +" Legacy groups for official git.vim and diff.vim syntax +hi! link diffAdded DiffAdd +hi! link diffChanged DiffChange +hi! link diffRemoved DiffDelete + +if g:codedark_italics | call hi('Comment', s:cdGreen, {}, 'italic', {}) | else | call hi('Comment', s:cdGreen, {}, 'none', {}) | endif call hi('Constant', s:cdBlue, {}, 'none', {}) call hi('String', s:cdOrange, {}, 'none', {}) @@ -204,7 +215,7 @@ call hi('Special', s:cdYellowOrange, {}, 'none', {}) call hi('SpecialChar', s:cdFront, {}, 'none', {}) call hi('Tag', s:cdFront, {}, 'none', {}) call hi('Delimiter', s:cdFront, {}, 'none', {}) -call hi('SpecialComment', s:cdGreen, {}, 'none', {}) +if g:codedark_italics | call hi('SpecialComment', s:cdGreen, {}, 'italic', {}) | else | call hi('SpecialComment', s:cdGreen, {}, 'none', {}) | endif call hi('Debug', s:cdFront, {}, 'none', {}) call hi('Underlined', s:cdNone, {}, 'underline', {}) @@ -221,6 +232,64 @@ call hi('SpellCap', s:cdRed, s:cdBack, 'undercurl', s:cdRed) call hi('SpellRare', s:cdRed, s:cdBack, 'undercurl', s:cdRed) call hi('SpellLocal', s:cdRed, s:cdBack, 'undercurl', s:cdRed) + +" Neovim Treesitter: +call hi('TSError', s:cdRed, {}, 'none', {}) +call hi('TSPunctDelimiter', s:cdFront, {}, 'none', {}) +call hi('TSPunctBracket', s:cdFront, {}, 'none', {}) +call hi('TSPunctSpecial', s:cdFront, {}, 'none', {}) +" Constant +call hi('TSConstant', s:cdYellow, {}, 'none', {}) +call hi('TSConstBuiltin', s:cdBlue, {}, 'none', {}) +call hi('TSConstMacro', s:cdBlueGreen, {}, 'none', {}) +call hi('TSStringRegex', s:cdOrange, {}, 'none', {}) +call hi('TSString', s:cdOrange, {}, 'none', {}) +call hi('TSStringEscape', s:cdYellowOrange, {}, 'none', {}) +call hi('TSCharacter', s:cdOrange, {}, 'none', {}) +call hi('TSNumber', s:cdLightGreen, {}, 'none', {}) +call hi('TSBoolean', s:cdBlue, {}, 'none', {}) +call hi('TSFloat', s:cdLightGreen, {}, 'none', {}) +call hi('TSAnnotation', s:cdYellow, {}, 'none', {}) +call hi('TSAttribute', s:cdBlueGreen, {}, 'none', {}) +call hi('TSNamespace', s:cdBlueGreen, {}, 'none', {}) +" Functions +call hi('TSFuncBuiltin', s:cdYellow, {}, 'none', {}) +call hi('TSFunction', s:cdYellow, {}, 'none', {}) +call hi('TSFuncMacro', s:cdYellow, {}, 'none', {}) +call hi('TSParameter', s:cdLightBlue, {}, 'none', {}) +call hi('TSParameterReference', s:cdLightBlue, {}, 'none', {}) +call hi('TSMethod', s:cdYellow, {}, 'none', {}) +call hi('TSField', s:cdLightBlue, {}, 'none', {}) +call hi('TSProperty', s:cdLightBlue, {}, 'none', {}) +call hi('TSConstructor', s:cdBlueGreen, {}, 'none', {}) +" Keywords +call hi('TSConditional', s:cdPink, {}, 'none', {}) +call hi('TSRepeat', s:cdPink, {}, 'none', {}) +call hi('TSLabel', s:cdLightBlue, {}, 'none', {}) +call hi('TSKeyword', s:cdBlue, {}, 'none', {}) +call hi('TSKeywordFunction', s:cdBlue, {}, 'none', {}) +call hi('TSKeywordOperator', s:cdBlue, {}, 'none', {}) +call hi('TSOperator', s:cdFront, {}, 'none', {}) +call hi('TSException', s:cdPink, {}, 'none', {}) +call hi('TSType', s:cdBlueGreen, {}, 'none', {}) +call hi('TSTypeBuiltin', s:cdBlue, {}, 'none', {}) +call hi('TSStructure', s:cdLightBlue, {}, 'none', {}) +call hi('TSInclude', s:cdPink, {}, 'none', {}) +" Variable +call hi('TSVariable', s:cdLightBlue, {}, 'none', {}) +call hi('TSVariableBuiltin', s:cdLightBlue, {}, 'none', {}) +" Text +call hi('TSText', s:cdYellowOrange, {}, 'none', {}) +call hi('TSStrong', s:cdYellowOrange, {}, 'none', {}) +call hi('TSEmphasis', s:cdYellowOrange, {}, 'none', {}) +call hi('TSUnderline', s:cdYellowOrange, {}, 'none', {}) +call hi('TSTitle', s:cdYellowOrange, {}, 'none', {}) +call hi('TSLiteral', s:cdYellowOrange, {}, 'none', {}) +call hi('TSURI', s:cdYellowOrange, {}, 'none', {}) +" Tags +call hi('TSTag', s:cdBlue, {}, 'none', {}) +call hi('TSTagDelimiter', s:cdGray, {}, 'none', {}) + " Markdown: call hi('markdownBold', s:cdBlue, {}, 'bold', {}) call hi('markdownCode', s:cdOrange, {}, 'none', {}) @@ -233,6 +302,29 @@ call hi('markdownUrl', s:cdLightBlue, {}, 'underline', {}) call hi('markdownLinkText', s:cdOrange, {}, 'none', {}) call hi('markdownEscape', s:cdYellowOrange, {}, 'none', {}) +" Asciidoc (for default syntax highlighting) +call hi("asciidocAttributeEntry", s:cdYellowOrange, {}, 'none', {}) +call hi("asciidocAttributeList", s:cdPink, {}, 'none', {}) +call hi("asciidocAttributeRef", s:cdYellowOrange, {}, 'none', {}) +call hi("asciidocHLabel", s:cdBlue, {}, 'bold', {}) +call hi("asciidocListingBlock", s:cdOrange, {}, 'none', {}) +call hi("asciidocMacroAttributes", s:cdYellowOrange, {}, 'none', {}) +call hi("asciidocOneLineTitle", s:cdBlue, {}, 'bold', {}) +call hi("asciidocPassthroughBlock", s:cdBlue, {}, 'none', {}) +call hi("asciidocQuotedMonospaced", s:cdOrange, {}, 'none', {}) +call hi("asciidocTriplePlusPassthrough", s:cdYellow, {}, 'none', {}) +call hi("asciidocMacro", s:cdPink, {}, 'none', {}) +call hi("asciidocAdmonition", s:cdOrange, {}, 'none', {}) +call hi("asciidocQuotedEmphasized", s:cdBlue, {}, 'italic', {}) +call hi("asciidocQuotedEmphasized2", s:cdBlue, {}, 'italic', {}) +call hi("asciidocQuotedEmphasizedItalic", s:cdBlue, {}, 'italic', {}) +hi! link asciidocBackslash Keyword +hi! link asciidocQuotedBold markdownBold +hi! link asciidocQuotedMonospaced2 asciidocQuotedMonospaced +hi! link asciidocQuotedUnconstrainedBold asciidocQuotedBold +hi! link asciidocQuotedUnconstrainedEmphasized asciidocQuotedEmphasized +hi! link asciidocURL markdownUrl + " JSON: call hi('jsonKeyword', s:cdLightBlue, {}, 'none', {}) call hi('jsonEscape', s:cdYellowOrange, {}, 'none', {}) @@ -450,6 +542,7 @@ call hi('luaFuncKeyword', s:cdPink, {}, 'none', {}) call hi('luaLocal', s:cdPink, {}, 'none', {}) call hi('luaBuiltIn', s:cdBlue, {}, 'none', {}) + " SH: call hi('shDeref', s:cdLightBlue, {}, 'none', {}) call hi('shVariable', s:cdLightBlue, {}, 'none', {}) @@ -463,3 +556,59 @@ call hi('sqlOperator', s:cdPink, {}, 'none', {}) call hi('yamlKey', s:cdBlue, {}, 'none', {}) call hi('yamlConstant', s:cdBlue, {}, 'none', {}) +" C++: +call hi('CTagsClass', s:cdBlueGreen, {}, 'none', {}) +call hi('CTagsStructure', s:cdBlueGreen, {}, 'none', {}) +call hi('CTagsNamespace', s:cdBlueGreen, {}, 'none', {}) +call hi('CTagsGlobalVariable', s:cdBlueGreen, {}, 'none', {}) +call hi('CTagsDefinedName ', s:cdBlue, {}, 'none', {}) +highlight def link CTagsFunction Function +highlight def link CTagsMember Identifier + +" C++ color_coded +call hi('StructDecl', s:cdBlueGreen, {}, 'none', {}) +call hi('UnionDecl', s:cdBlueGreen, {}, 'none', {}) +call hi('ClassDecl', s:cdBlueGreen, {}, 'none', {}) +call hi('TypeRef', s:cdBlueGreen, {}, 'none', {}) +call hi('TypedefDecl', s:cdBlueGreen, {}, 'none', {}) +call hi('TypeAliasDecl', s:cdBlueGreen, {}, 'none', {}) +call hi('EnumDecl', s:cdBlueGreen, {}, 'none', {}) +call hi('TemplateTypeParameter', s:cdBlueGreen, {}, 'none', {}) +call hi('TypeAliasTemplateDecl', s:cdBlueGreen, {}, 'none', {}) +call hi('ClassTemplate', s:cdBlueGreen, {}, 'none', {}) +call hi('ClassTemplatePartialSpecialization', s:cdBlueGreen, {}, 'none', {}) +call hi('FunctionTemplate', s:cdBlueGreen, {}, 'none', {}) +call hi('TemplateRef', s:cdBlueGreen, {}, 'none', {}) +call hi('TemplateTemplateParameter', s:cdBlueGreen, {}, 'none', {}) +call hi('UsingDeclaration', s:cdBlueGreen, {}, 'none', {}) +call hi('MemberRef', s:cdLightBlue, {}, 'italic', {}) +call hi('MemberRefExpr', s:cdYellow, {}, 'italic', {}) +call hi('Namespace', s:cdSilver, {}, 'none', {}) +call hi('NamespaceRef', s:cdSilver, {}, 'none', {}) +call hi('NamespaceAlias', s:cdSilver, {}, 'none', {}) + +" C++ lsp-cxx-highlight +call hi('LspCxxHlSymClass', s:cdBlueGreen, {}, 'none', {}) +call hi('LspCxxHlSymStruct', s:cdBlueGreen, {}, 'none', {}) +call hi('LspCxxHlSymEnum', s:cdBlueGreen, {}, 'none', {}) +call hi('LspCxxHlSymTypeAlias', s:cdBlueGreen, {}, 'none', {}) +call hi('LspCxxHlSymTypeParameter', s:cdBlueGreen, {}, 'none', {}) +call hi('LspCxxHlSymConcept', s:cdBlueGreen, {}, 'italic', {}) +call hi('LspCxxHlSymNamespace', s:cdSilver, {}, 'none', {}) + +" Coc Explorer: +call hi('CocHighlightText', {}, s:cdSelection, 'none', {}) +call hi('CocExplorerIndentLine', s:cdCursorDark, {}, 'none', {}) + +" nvim-cmp +call hi('CmpItemAbbrDeprecated', s:cdGray, {}, 'strikethrough', {}) +call hi('CmpItemAbbrMatch', s:cdBlue, {}, 'none', {}) +call hi('CmpItemAbbrMatchFuzzy', s:cdBlue, {}, 'none', {}) +call hi('CmpItemKindVariable', s:cdLightBlue, {}, 'none', {}) +call hi('CmpItemKindInterface', s:cdLightBlue, {}, 'none', {}) +call hi('CmpItemKindText', s:cdLightBlue, {}, 'none', {}) +call hi('CmpItemKindFunction', s:cdPink, {}, 'none', {}) +call hi('CmpItemKindMethod ', s:cdPink, {}, 'none', {}) +call hi('CmpItemKindKeyword', s:cdFront, {}, 'none', {}) +call hi('CmpItemKindProperty', s:cdFront, {}, 'none', {}) +call hi('CmpItemKindUnit', s:cdFront, {}, 'none', {})