From 07f81f149613c4b10bca3a1f162cafc5b45854f1 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Thu, 7 Dec 2023 16:34:24 +0530 Subject: [PATCH] nvim: Drop our yolokai theme and use default --- nvim/.config/nvim/colors/yolokai.vim | 697 --------------------------- nvim/.config/nvim/init.lua | 3 - nvim/.config/nvim/lua/yolokai.lua | 156 ------ 3 files changed, 856 deletions(-) delete mode 100644 nvim/.config/nvim/colors/yolokai.vim delete mode 100644 nvim/.config/nvim/lua/yolokai.lua diff --git a/nvim/.config/nvim/colors/yolokai.vim b/nvim/.config/nvim/colors/yolokai.vim deleted file mode 100644 index 42d7e92..0000000 --- a/nvim/.config/nvim/colors/yolokai.vim +++ /dev/null @@ -1,697 +0,0 @@ -lua << EOF -vim.g.colors_name = 'yolokai' - -local white = { '#E6E6E6', 252, 'white' } -local white2 = { '#FFFFFF', 250, 'white2' } -local black = { '#000000', 234, 'black' } -local lightblack = { '#181818', 235, 'lightblack' } -local lightblack2 = { '#383A3E', 236, 'lightblack2' } -local lightblack3 = { '#3F4145', 237, 'lightblack3' } -local darkblack = { '#211F1C', 233, 'darkblack' } -local grey = { '#8F908A', 243, 'grey' } -local lightgrey = { '#575b61', 237, 'lightgrey' } -local darkgrey = { '#64645E', 239, 'darkgrey' } -local warmgrey = { '#A6A185', 59, 'warmgrey' } - -local pink = { '#F92772', 197, 'pink' } -local green = { '#3ECF5B', 148, 'green' } -local darkgreen = { '#17E640', 83, 'darkgreen' } -local aqua = { '#0BA6DA', 81, 'aqua' } -local yellow = { '#CFCF17', 186, 'yellow' } -local orange = { '#FD9720', 208, 'orange' } -local purple = { '#AE81FF', 141, 'purple' } -local red = { '#CF1745', 196, 'red' } -local purered = { '#FF0000', 52, 'purered' } -local darkred = { '#FF1A53', 52, 'darkred' } - --- This is the only highlight that must be defined separately. -local highlight_group_normal = {bg=black, fg=white} - --- This is where the rest of your highlights should go. -local highlight_groups = { - --[[ 4.1. Text Analysis ]] - EndOfBuffer = 'NonText' , - Whitespace = 'NonText' , - Comment = { fg=white2 , style='italic' }, - NonText = { fg=lightgrey }, - - --[[ 4.1.1. Literals]] - Constant = { fg=purple }, - String = { fg=yellow }, - Character = { fg=yellow }, - Number = { fg=purple }, - Boolean = { fg=purple }, - Float = 'Number' , - - --[[ 4.1.2. Identifiers]] - Identifier = { fg=green }, - Function = { fg=darkgreen }, - - --[[ 4.1.3. Syntax]] - Repeat = 'Keyword', - Noise = 'Delimiter', - Statement = { fg=pink }, - Conditional = { fg=pink, style='italic' }, - Label = { fg=pink, style='italic' }, - Operator = { fg=pink }, - Keyword = { fg=pink, style='bold' }, - Exception = { fg=red, style='bold' }, - - --[[ 4.1.4. Metatextual Information]] - PreProc = { fg=green }, - Include = { fg=pink, style='nocombine' }, - Define = { fg=pink, style='nocombine' }, - Macro = { fg=orange, style={'bold', 'nocombine' }}, - PreCondit = { fg=green, style='nocombine' }, - - --[[ 4.1.5. Semantics]] - Type = { fg=aqua }, - StorageClass = { fg=aqua, style='bold' }, - Structure = { fg=aqua, style='bold' }, - Typedef = { fg=aqua, style='italic' }, - - --[[ 4.1.6. Edge Cases]] - SpecialChar = 'Character' , - SpecialKey = 'Character' , - Tag = 'Underlined', - Special = { fg=purple }, - Delimiter = { fg=red }, - -- SpecialComment affects Haskell Language Extension - SpecialComment = { fg=orange , style={'bold', 'nocombine'}}, - Debug = 'WarningMsg', - - --[[ 4.1.7. Help Syntax]] - Ignore = { fg=gray }, - Error = { bg=black , fg=red }, - Underlined = { fg=green , style='underline' }, - Todo = { fg=orange, style={'bold', 'underline' }}, - Hint = { bg=black , fg=white, style='bold' }, - Info = { bg=orange, fg=black, style='bold' }, - Warning = { bg=pink , fg=black, style='bold' }, - - --[[ 4.2... Editor UI ]] - --[[ 4.2.1. Status Line]] - StatusLine = { bg=black, fg=warmgrey }, - StatusLineNC = { bg=black, fg=darkgrey }, - StatusLineTerm = 'StatusLine' , - StatusLineTermNC = 'StatusLineNC', - - --[[ 4.2.2. Separators]] - WinSeparator= { bg=darkblack, fg=darkgrey }, - TabLine = { bg=darkblack, fg=white }, - TabLineFill = { fg=white }, - TabLineSel = { bg=darkgrey, fg=white, style='inverse' }, - Title = { style='bold' }, - - --[[ 4.2.3. Conditional Line Highlighting]] - --Conceal={} - debugBreakpoint = 'ErrorMsg' , - debugPC = 'ColorColumn', - CursorLine = { bg=lightblack2 }, - CursorLineNr = { bg=lightblack, fg=orange }, - LineNr = { bg=black, fg=grey }, - QuickFixLine = { bg=darkgrey }, - Visual = { style='inverse' }, - VisualNOS = { bg=darkgrey }, - - --[[ 4.2.4. Popup Menu]] - Pmenu = { bg=black, fg=aqua }, - PmenuSbar = { bg=black }, - PmenuSel = { bg=warmgrey, fg=white, style='bold' }, - PmenuThumb = { bg=grey, fg=lightblack }, - WildMenu = {}, - - --[[ 4.2.5. Folds]] - FoldColumn = { bg=darkblack, style='bold' }, - Folded = { bg=darkblack, fg=warmgrey, style='italic' }, - - --[[ 4.2.6. Diffs]] - DiffAdd = { bg=black, fg=darkgreen }, - DiffChange = { bg=black, fg=yellow }, - DiffDelete = { bg=black, fg=red }, - DiffText = { bg=black }, - - --[[ 4.2.7. Searching]] - IncSearch = { style='inverse' }, - Search = { bg=yellow,fg=black, style={'underline', color=white }}, - CurSearch = { bg=pink, fg=black, style={'underline', color=white }}, - MatchParen = { fg=orange, style={'bold', 'underline' }}, - - --[[ 4.2.8. Spelling]] - SpellBad = { style={'undercurl', color=red }}, - SpellCap = { style={'undercurl', color=purple }}, - SpellLocal = { style={'undercurl', color=pink }}, - SpellRare = { style={'undercurl', color=aqua }}, - - --[[ 4.2.9. Conditional Column Highlighting]] - ColorColumn = { bg=lightblack }, - SignColumn = { bg=black }, - - --[[ 4.2.10. Messages]] - ErrorMsg = { bg=black, fg=red }, - HintMsg = { bg=black, fg=purple, style='bold' }, - InfoMsg = { bg=black, fg=orange, style='bold' }, - ModeMsg = { bg=black, fg=yellow }, - WarningMsg = { bg=black, fg=pink, style='bold' }, - Question = { bg=black, fg=yellow, style='underline' }, - - --[[ 4.2.11. Diagnostics ]] - DiagnosticError = 'ErrorMsg' , - DiagnosticWarn = 'WarningMsg', - DiagnosticInfo = 'InfoMsg' , - DiagnosticHint = 'HintMsg' , - - DiagnosticFloatingError = 'ErrorMsg' , - DiagnosticFloatingWarn = 'WarningMsg', - DiagnosticFloatingInfo = 'InfoMsg' , - DiagnosticFloatingHint = 'HintMsg' , - - DiagnosticSignError = 'ErrorMsg' , - DiagnosticSignWarn = 'WarningMsg', - DiagnosticSignInfo = 'InfoMsg' , - DiagnosticSignHint = 'HintMsg' , - - DiagnosticUnderlineError = {style={'undercurl', color=red }}, - DiagnosticUnderlineWarn = {style={'undercurl', color=pink }}, - DiagnosticUnderlineInfo = {style={'undercurl', color=orange }}, - DiagnosticUnderlineHint = {style={'undercurl', color=purple }}, - - DiagnosticVirtualTextError = 'ErrorMsg' , - DiagnosticVirtualTextWarn = 'WarningMsg', - DiagnosticVirtualTextInfo = 'InfoMsg' , - DiagnosticVirtualTextHint = 'HintMsg' , - - --[[ 4.2.12. Cursor ]] - CursorIM = 'Cursor', - Cursor = { bg=white, fg=black, style='inverse' }, - CursorColumn = { bg=lightblack2 }, - - --[[ 4.2.13. Misc ]] - Terminal = 'Normal', - Directory = { fg=aqua, style='bold' }, - NormalFloat = { bg=black, fg=white }, - - --[[ 4.2.14. LSP Highlight ]] - LspReferenceText = 'InfoMsg', - LspReferenceRead = 'InfoMsg', - LspReferenceWrite = 'InfoMsg', - LspInlayHint = 'NonText', - - --[[ 4.2.15. LSP (for Semantic Token highlighting) ]] - ['@lsp.type.boolean'] = '@boolean' , - ['@lsp.type.character'] = '@character' , - ['@lsp.type.class'] = '@type' , - ['@lsp.mod.constant'] = '@constant' , - ['@lsp.type.decorator'] = '@function' , - ['@lsp.type.enum'] = '@type' , - ['@lsp.type.enumMember'] = '@constant' , - ['@lsp.type.float'] = '@float' , - ['@lsp.type.function'] = '@function' , - ['@lsp.type.interface'] = '@type' , - ['@lsp.type.macro'] = '@macro' , - ['@lsp.type.method'] = '@method' , - ['@lsp.type.namespace'] = '@namespace' , - ['@lsp.type.number'] = '@number' , - ['@lsp.type.operator'] = '@operator' , - ['@lsp.type.parameter'] = '@parameter' , - ['@lsp.type.property'] = '@property' , - ['@lsp.mod.readonly'] = '@lsp.mod.constant', - ['@lsp.type.string'] = '@string' , - ['@lsp.type.struct'] = '@structure' , - ['@lsp.type.type'] = '@type' , - ['@lsp.type.variable'] = '@variable' , - ['@lsp.typemod.type.readonly'] = '@lsp.type.type' , - - --[[ 4.3. Programming Languages - Everything in this section is OPTIONAL. Feel free to remove everything - here if you don't want to define it, or add more if there's something - missing. - ]] - - --[[ 4.3.1. C ]] - cConstant = 'Constant', - cCustomClass = 'Type' , - - --[[ 4.3.2. C++ ]] - cppSTLexception = 'Exception', - cppSTLnamespace = 'String' , - - --[[ 4.3.3 C# ]] - csBraces = 'Delimiter', - csClass = 'Structure', - csClassType = 'Type', - csContextualStatement = 'Conditional', - csEndColon = 'Delimiter', - csGeneric = 'Typedef', - csInterpolation = 'Include', - csInterpolationDelimiter = 'SpecialChar', - csLogicSymbols = 'Operator', - csModifier = 'Keyword', - csNew = 'Operator', - csNewType = 'Type', - csParens = 'Delimiter', - csPreCondit = 'PreProc', - csQuote = 'Delimiter', - csRepeat = 'Repeat', - csStorage = 'StorageClass', - csUnspecifiedStatement = 'Statement', - csXmlTag = 'Define', - csXmlTagName = 'Define', - razorCode = 'PreProc', - razorcsLHSMemberAccessOperator = 'Noise', - razorcsRHSMemberAccessOperator = 'razorcsLHSMemberAccessOperator', - razorcsStringDelimiter = 'razorhtmlValueDelimiter', - razorcsTypeNullable = 'Special', - razorcsUnaryOperatorKeyword = 'Operator', - razorDelimiter = 'Delimiter', - razorEventAttribute = 'PreCondit', - razorFor = 'razorIf', - razorhtmlAttribute = 'htmlArg', - razorhtmlAttributeOperator = 'Operator', - razorhtmlTag = 'htmlTag', - razorhtmlValueDelimiter = 'Delimiter', - razorIf = 'PreCondit', - razorImplicitExpression = 'PreProc', - razorLine = 'Constant', - razorUsing = 'Include', - - --[[ 4.3.4. CSS ]] - cssAtRule = 'PreCondit', - cssAttr = 'Keyword', - cssAttrComma = 'Noise', - cssAttrRegion = 'Keyword', - cssBraces = 'Delimiter', - cssClassName = 'Identifier', - cssClassNameDot = 'Noise', - cssFlexibleBoxAttr = 'cssAttr', - cssFunctionComma = 'Noise', - cssImportant = 'Exception', - cssNoise = 'Noise', - cssProp = 'Label', - cssPseudoClass = 'Special', - cssPseudoClassId = 'cssSelectorOp', - cssSelectorOp = 'Operator', - cssTagName = 'Structure', - cssUnitDecorators = 'Type', - scssAmpersand = 'Special', - scssAttribute = 'Noise', - scssBoolean = 'Boolean', - scssDefault = 'Keyword', - scssElse = 'scssIf', - scssMixinName = function(self) - local super = self.cssClassName - return {bg = super.bg, fg=super.fg, style='italic'} - end, - scssIf = 'PreCondit', - scssInclude = 'Include', - scssSelectorChar = 'Delimiter', - scssDefinition = 'PreProc', - scssSelectorName = 'Identifier', - scssVariable = 'Define', - scssVariableAssignment = 'Operator', - - --[[ 4.3.5. Dart ]] - dartLibrary = 'Statement', - - --[[ 4.3.6. dot ]] - dotKeyChar = 'Character', - dotType = 'Type' , - - --[[ 4.3.7. Go ]] - goBlock = 'Delimiter' , - goBoolean = 'Boolean' , - goBuiltins = 'Operator' , - goField = 'Identifier', - goFloat = 'Float' , - goFormatSpecifier = 'Character' , - goFunction = 'Function' , - goFunctionCall = 'goFunction', - goFunctionReturn = {}, - goMethodCall = 'goFunctionCall', - goParamType = 'goReceiverType', - goPointerOperator = 'SpecialChar' , - goPredefinedIdentifiers = 'Constant' , - goReceiver = 'goBlock' , - goReceiverType = 'goTypeName' , - goSimpleParams = 'goBlock' , - goType = 'Type' , - goTypeConstructor = 'goFunction' , - goTypeName = 'Type' , - goVarAssign = 'Identifier' , - goVarDefs = 'goVarAssign' , - - --[[ 4.3.8. HTML ]] - htmlArg = 'Label', - htmlBold = { fg=lightgrey, style='bold' }, - htmlTitle = 'htmlBold', - htmlEndTag = 'htmlTag', - htmlH1 = 'markdownH1', - htmlH2 = 'markdownH2', - htmlH3 = 'markdownH3', - htmlH4 = 'markdownH4', - htmlH5 = 'markdownH5', - htmlH6 = 'markdownH6', - htmlItalic = { style='italic' }, - htmlSpecialTagName = 'Keyword', - htmlTag = 'Special', - htmlTagN = 'Typedef', - htmlTagName = 'Type', - - --[[ 4.3.9. Java ]] - javaClassDecl = 'Structure', - - --[[ 4.3.10. JavaScript ]] - jsFuncBlock = 'Function' , - jsObjectKey = 'Type' , - jsReturn = 'Keyword' , - jsVariableDef = 'Identifier', - - --[[ 4.3.11. JSON ]] - jsonBraces = 'Structure', - jsonKeywordMatch = 'Delimiter', - jsonNull = 'Constant' , - jsonQuote = 'String' , - jsonString = 'Normal' , - jsonStringSQError = 'Exception', - - --[[ 4.3.12. Make ]] - makeCommands = 'Statment', - makeSpecTarget = 'Type' , - - --[[ 4.3.13. Markdown ]] - markdownH1 = { fg=green_dark, style='bold' }, - markdownH2 = { fg=red_light, style='bold' }, - markdownH3 = { fg=green, style='bold' }, - markdownH4 = { fg=purple, style='bold' }, - markdownH5 = { fg=orange, style='bold' }, - markdownH6 = { fg=yellow, style='bold' }, - mkdBold = 'SpecialComment' , - mkdCode = 'Keyword' , - mkdCodeDelimiter = 'mkdBold' , - mkdCodeStart = 'mkdCodeDelimiter', - mkdCodeEnd = 'mkdCodeStart' , - mkdHeading = 'Delimiter' , - mkdItalic = 'mkdBold' , - mkdListItem = 'Special' , - mkdRule = 'Underlined' , - texMathMatcher = 'Number' , - texMathZoneX = 'Number' , - texMathZoneY = 'Number' , - - --[[ 4.3.14. Python ]] - pythonBrackets = 'Delimiter' , - pythonBuiltinFunc = 'Operator' , - pythonBuiltinObj = 'Type' , - pythonBuiltinType = 'Type' , - pythonClass = 'Structure' , - pythonClassParameters = 'pythonParameters', - pythonDecorator = 'PreProc' , - pythonDottedName = 'Identifier' , - pythonError = 'Error' , - pythonException = 'Exception' , - pythonInclude = 'Include' , - pythonIndentError = 'pythonError' , - pythonLambdaExpr = 'pythonOperator' , - pythonOperator = 'Operator' , - pythonParam = 'Identifier' , - pythonParameters = 'Delimiter' , - pythonSelf = 'Statement' , - pythonSpaceError = 'pythonError' , - pythonStatement = 'Statement' , - - --[[ 4.3.15. Ruby ]] - rubyClass = 'Structure', - rubyDefine = 'Define' , - rubyInterpolationDelimiter = 'Delimiter', - - --[[ 4.3.16. Rust ]] - rustAssert = 'Debug' , - rustConstraint = 'Operator' , - rustDynKeyword = 'rustStorage', - rustGeneric = 'Delimiter' , - rustEscape = 'SpecialChar', - rustIdentifier = 'Identifier' , - rustKeyword = 'Keyword' , - rustLifetime = 'Label' , - rustModPath = 'Include' , - rustNoise = 'Delimiter' , - rustPanic = 'Exception' , - rustRepeat = 'Repeat' , - rustScopeDecl = 'Delimiter' , - rustStructure = 'Structure' , - rustUnused = 'Special' , - - --[[ 4.3.17. Scala ]] - scalaKeyword = 'Keyword' , - scalaNameDefinition = 'Identifier', - - --[[ 4.3.18. shell ]] - shDerefSimple = 'SpecialChar', - shFunctionKey = 'Function' , - shLoop = 'Repeat' , - shParen = 'Delimiter' , - shQuote = 'Delimiter' , - shSet = 'Statement' , - shTestOpr = 'Debug' , - - --[[ 4.3.19. Solidity ]] - solBuiltinType = 'Type' , - solContract = 'Typedef' , - solContractName = 'Function', - - --[[ 4.3.20. TOML ]] - tomlComment = 'Comment' , - tomlDate = 'Special' , - tomlFloat = 'Float' , - tomlKey = 'Label' , - tomlTable = 'StorageClass', - - --[[ 4.3.21. VimScript ]] - vimFgBgAttrib = 'Constant' , - vimHiCterm = 'Label' , - vimHiCtermFgBg = 'vimHiCterm', - vimHiGroup = 'Typedef' , - vimHiGui = 'vimHiCterm', - vimHiGuiFgBg = 'vimHiGui' , - vimHiKeyList = 'Operator' , - vimOption = 'Keyword' , - vimScriptDelim = 'Ignore' , - vimSet = 'String' , - vimSetEqual = 'Operator' , - vimSetSep = 'Delimiter' , - - --[[ 4.3.22. XML ]] - xmlAttrib = 'Label' , - xmlEndTag = 'Exception', - xmlEqual = 'Operator' , - xmlTag = 'Delimiter', - xmlTagName = 'Define' , - - --[[ 4.3.23 Haskell ]] - haskellType = 'Type' , - haskellIdentifier = 'Identifier', - haskellOperators = 'Operator' , - haskellWhere = 'Keyword' , - haskellDelimiter = 'Delimiter' , - haskellImportKeywords = 'Include' , - haskellStatement = 'Statement' , - - --[[ 4.3.24 Lua ]] - luaBraces = 'Structure', - luaBrackets = 'Delimiter', - luaBuiltin = 'Keyword', - luaComma = 'Delimiter', - luaFuncArgName = 'Identifier', - luaFuncCall = 'Function', - luaFuncId = 'luaNoise', - luaFuncKeyword = 'Type', - luaFuncName = 'Function', - luaFuncParens = 'Delimiter', - luaFuncTable = 'Structure', - luaIn = 'luaRepeat', - luaLocal = 'Type', - luaNoise = 'Delimiter', - luaParens = 'Delimiter', - luaSpecialTable = 'Structure', - luaSpecialValue = 'Function', - luaStringLongTag = function(self) - local delimiter = self.Delimiter - return {bg = delimiter.bg, fg=delimiter.fg, style='italic'} - end, - - --[[ 4.3.25. SQL ]] - sqlKeyword = 'Keyword' , - sqlParen = 'Delimiter', - sqlSpecial = 'Constant' , - sqlStatement = 'Statement', - sqlParenFunc = 'Function' , - - --[[ 4.3.26. dos INI ]] - dosiniHeader = 'Title', - dosiniLabel = 'Label', - - --[[ 4.3.27. Crontab ]] - crontabDay = 'StorageClass', - crontabDow = 'String' , - crontabHr = 'Number' , - crontabMin = 'Float' , - crontabMnth = 'Structure' , - - --[[ 4.3.28. PlantUML ]] - plantumlArrowLR = 'Statement', - plantumlColonLine = {} , - plantumlMindmap = 'Label' , - plantumlMindmap2 = 'Label' , - - --[[ 4.3.33. YAML ]] - yamlKey = 'Label', - yamlBlockMappingKey = { bg=black, fg=red }, - yamlPlainScalar = { bg=black, fg=green }, - - --[[ 4.3.34. Git ]] - diffAdded = 'DiffAdd' , - diffRemoved = 'DiffDelete' , - gitcommitHeader = 'SpecialComment' , - gitcommitDiscardedFile = 'gitcommitSelectedFile', - gitcommitOverFlow = 'Error' , - gitcommitSelectedFile = 'Directory' , - gitcommitSummary = 'Title' , - gitcommitUntrackedFile = 'gitcommitSelectedFile', - gitconfigAssignment = 'String' , - gitconfigEscape = 'SpecialChar' , - gitconfigNone = 'Operator' , - gitconfigSection = 'Structure' , - gitconfigVariable = 'Label' , - gitrebaseBreak = 'Keyword' , - gitrebaseCommit = 'Tag' , - gitrebaseDrop = 'Exception' , - gitrebaseEdit = 'Define' , - gitrebaseExec = 'PreProc' , - gitrebaseFixup = 'gitrebaseSquash' , - gitrebaseMerge = 'PreProc' , - gitrebasePick = 'Include' , - gitrebaseReset = 'gitrebaseLabel' , - gitrebaseReword = 'gitrebasePick' , - gitrebaseSquash = 'Macro' , - gitrebaseSummary = 'Normal' , - -- Needed for treesitter diff - ['@text.diff.add'] = 'DiffAdd' , - ['@text.diff.delete'] = 'DiffDelete' , - - --[[ 4.3.35 Help ]] - helpHeader = 'Label' , - helpOption = 'Keyword' , - helpHeadline = 'Title' , - helpSectionDelim = 'Delimiter' , - helpHyperTextJump = 'Underlined', - - --[[ 4.4. Plugins - Everything in this section is OPTIONAL. Feel free to remove everything - here if you don't want to define it, or add more if there's something - missing. - ]] - --[[ 4.4.1. ALE ]] - ALEErrorSign = 'ErrorMsg' , - ALEWarningSign = 'WarningMsg', - - --[[ 4.4.2. vim-jumpmotion / vim-easymotion ]] - EasyMotion = 'IncSearch' , - JumpMotion = 'EasyMotion', - - --[[ 4.4.3. vim-markdown ]] - htmlH1 = 'markdownH1', - htmlH2 = 'markdownH2', - htmlH3 = 'markdownH3', - htmlH4 = 'markdownH4', - htmlH5 = 'markdownH5', - htmlH6 = 'markdownH6', - - --[[ 4.4.4. vim-gitgutter / vim-signify ]] - GitGutterAdd = { fg=green }, - GitGutterChange = { fg=yellow }, - GitGutterDelete = { fg=red }, - GitGutterChangeDelete = { fg=orange }, - - SignifySignAdd = 'GitGutterAdd' , - SignifySignChange = 'GitGutterChange' , - SignifySignDelete = 'GitGutterDelete' , - SignifySignChangeDelete = 'GitGutterChangeDelete', - - --[[ 4.4.5. vim-indent-guides ]] - IndentGuidesOdd = { bg=darkgrey }, - IndentGuidesEven = { bg=grey }, - - --[[ 4.4.7. NERDTree ]] - NERDTreeCWD = 'Label' , - NERDTreeUp = 'Operator' , - NERDTreeDir = 'Directory' , - NERDTreeDirSlash = 'Delimiter' , - NERDTreeOpenable = 'NERDTreeDir' , - NERDTreeClosable = 'NERDTreeOpenable', - NERDTreeExecFile = 'Function' , - NERDTreeLinkTarget = 'Tag' , - - --[[ 4.4.8 SearchLight ]] - SearchLight = { bg=black, fg=orange, style={'bold', 'italic', 'underline' }}, - - --[[ 4.4.9 Sneak ]] - Sneak = { bg=red, fg=black, style='bold' }, - SneakScope = { bg=black, fg=orange, style={'bold', 'underline' }}, - - --[[ 4.4.10 Which key ]] - WhichKey = 'Function' , - WhichKeySeperator = {bg=black, fg=green}, - WhichKeyGroup = 'Keyword' , - WhichKeyDesc = {bg=black, fg=orange}, - WhichKeyFloating = 'Pmenu' , - - --[[ 4.4.11 conflict-marker ]] - ConflictMarkerBegin = { bg=black, fg=purple }, - ConflictMarkerEnd = { bg=black, fg=purple }, - ConflictMarkerOurs = { bg=black, fg=green }, - ConflictMarkerTheirs = { bg=black, fg=red }, - ConflictMarkerCommonAncestorsHunk = { bg=black, fg=orange }, - - --[[ 4.4.12 hlslens ]] - HlSearchLensCur = 'SearchLight', - HlSearchLens = 'IncSearch', - HlSearchCur = 'SearchLight', - - --[[ 4.4.13 pandoc ]] - pandocAtxHeader = { bg=black, fg=aqua }, - pandocAtxStart = { bg=black, fg=orange }, - pandocDelimitedCodeBlockStart = { bg=black, fg=green }, - pandocDelimitedCodeBlockEnd = { bg=black, fg=green }, - pandocDelimitedCodeBlockLanguage = 'Comment', - pandocListItemBullet = { bg=black, fg=purple }, - pandocUListItemBullet = { bg=black, fg=purple }, - pandocReferenceURL = { bg=black, fg=pink, style={'underline' }}, - pandocReferenceDefinition = { bg=black, fg=aqua, style={'bold' }}, - pandocEmphasis = { bg=black, fg=purple, style={'italic' }}, - pandocStrong = { bg=black, fg=purple, style={'bold' }}, - pandocStrongEmphasis = { bg=black, fg=purple, style={'bold', 'italic' }}, - pandocStrongInEmphasis = 'pandocStrongEmphasis', - pandocEmphasisInStrong = 'pandocStrongEmphasis', - - --[[ 4.4.14 Hop ]] - HopNextKey = { bg=red , fg=black , style='bold' }, - HopNextKey1 = { bg=black, fg=orange , style='bold' }, - HopNextKey2 = { bg=black, fg=purple , style='bold' }, - HopUnmatched = { bg=black, fg=lightgrey, style='bold' }, - HopCursor = { bg=black, fg=aqua , style='bold' }, - - --[[ 4.4.15 Mini ]] - MiniTrailspace = { fg = red , style={ 'bold' , 'inverse' }}, - MiniJump = { fg = red , style={ 'underline', 'nocombine' }}, - MiniJump2dDim = 'NonText' , - MiniJump2dSpot = { fg = red , style={ 'underline', 'nocombine' }}, - MiniJump2dSpotUnique = { fg = red , style={ 'bold' , 'nocombine' }}, - MiniJump2dSpotAhead = { fg = white, style={ 'nocombine' }}, -} - -require('yolokai')( - highlight_group_normal, - highlight_groups -) - -EOF diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 474d2c1..09a2b11 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -126,6 +126,3 @@ require 'autocmd' require 'keymappings' require 'lsp' require 'treesitter' - --- Load our custom color scheme -vim.cmd.colorscheme('yolokai') diff --git a/nvim/.config/nvim/lua/yolokai.lua b/nvim/.config/nvim/lua/yolokai.lua deleted file mode 100644 index 16472bc..0000000 --- a/nvim/.config/nvim/lua/yolokai.lua +++ /dev/null @@ -1,156 +0,0 @@ ---- @class Yolokai.Definition ---- @field bg? string|table the background color ---- @field blend? number the transparency value ---- @field dark? Yolokai.Definition special highlight definition for when `&bg` is 'dark' ---- @field fg? string|table the foreground color ---- @field light? Yolokai.Definition special highlight definition for when `&bg` is 'light' ---- @field style? Yolokai.Style special appearance alterations - ---- @class Yolokai.Style ---- @field color string|table color of underline or undercurl - ---[[/* Vars */]] - ---- Which index to use for `gui` highlights. -local _PALETTE_HEX = 1 - ---- The `string` type. -local _TYPE_STRING = type '' - ---- The `table` type. -local _TYPE_TABLE = type {} - ---[[/* Helper Functions */]] - ---- @param color? string|table the color name or definition ---- @param index number ---- @return nil|number|string color_value a hex, 16-bit, or ANSI color. "NONE" by default -local function get(color, index) -- {{{ † - if color and color[index] then - return color[index] - elseif type(color) == _TYPE_STRING then - --- @diagnostic disable-next-line:return-type-mismatch (we test for `color == string`, which is a subtype of `(number|string)?` - return color - end -end --}}} ‡ - ---- @param rgb string some string of RGB colors. ---- @return string hex -local function tohex(rgb) return string.format('#%06x', rgb) end - ---- Create a metatable which prioritizes entries in the `&bg` index of `definition` ---- @param definition Yolokai.Definition the definition of the highlight group ---- @return table -local function use_background_with(definition) - return setmetatable(definition[vim.go.background], {__index = definition}) -end - ---[[/* Module */]] - ---- A Neovim plugin to create more straightforward syntax for Lua `:map`ping and `:unmap`ping. ---- @class Yolokai -local yolokai = {} - ---- @param name string the name of the highlight group ---- @return Yolokai.Definition definition an nvim-yolokai compliant table describing the highlight group `name` -function yolokai.group(name) - local no_errors, definition = pcall(vim.api.nvim_get_hl_by_name, name, vim.go.termguicolors) - - if not no_errors then definition = {} end - - -- the style of the highlight group - local style = {} - for k, v in pairs(definition) do - if k == 'special' then - style.color = tohex(v) - elseif k ~= 'background' and k ~= 'blend' and k ~= 'foreground' then - style[#style+1] = k - end - end - - return - { - fg = definition.foreground and tohex(definition.foreground), - bg = definition.background and tohex(definition.background), - blend = definition.blend, - style = style, - } -end - --- Generate a `:highlight` command from a group and some definition. - ---- Generate and execute `:highlight` command from a group and some definition. ---- @param group_name string the `{group-name}` argument for `:highlight` ---- @param definition Yolokai.Definition|string a link or an attribute map -function yolokai.highlight(group_name, definition) -- {{{ † - local highlight = {} - if type(definition) == _TYPE_STRING then -- `highlight_group` is a link to another group. - highlight.link = definition - else - -- Take care of special instructions for certain background colors. - if definition[vim.go.background] then - --- @diagnostic disable-next-line: param-type-mismatch (`str.dark` and `str.light` are `nil`) - definition = use_background_with(definition) - end - - highlight.bg = get(definition.bg, _PALETTE_HEX) - highlight.fg = get(definition.fg, _PALETTE_HEX) - - highlight.blend = definition.blend - - local style = definition.style - if type(style) == _TYPE_TABLE then - --- @diagnostic disable-next-line:param-type-mismatch (we check `type(style) == 'table'` right above this) - for _, option in ipairs(style) do highlight[option] = true end - --- @diagnostic disable-next-line:need-check-nil (we check `type(style) == 'table'` right above this) - highlight.special = get(style.color, _PALETTE_HEX) - elseif style then - highlight[style] = true - end - - highlight.reverse = highlight.inverse - highlight.inverse = nil - end - - vim.api.nvim_set_hl(0, group_name, highlight) -end --}}} ‡ - -return setmetatable(yolokai, {__call = function(self, normal, highlights) - --- resolve highlight groups being defined by function calls. - --- @param tbl table the current table being indexed. - --- @param key string the key to resolve the value for. - --- @param resolve_links boolean whether to translate highlight links into full values - --- @returns the value at `tbl[key]`, when highlight links and embedded functions have been accounted for. - local function resolve(tbl, key, resolve_links) - local original_value = tbl[key] - local original_value_type = type(original_value) - - if original_value_type == 'function' then -- call and cache the result; next time, if it isn't a function this step will be skipped - tbl[key] = original_value(setmetatable({}, - { - __index = function(_, inner_key) return resolve(tbl, inner_key, true) end - })) - elseif resolve_links and original_value_type == _TYPE_STRING and not string.find(original_value, '^#') then - return resolve(tbl, original_value, resolve_links) - end - - return tbl[key] - end - - -- save the colors_name before syntax reset - local color_name = vim.g.colors_name - - -- If the syntax has been enabled, reset it. - if vim.fn.exists 'syntax_on' then vim.api.nvim_command 'syntax reset' end - - -- replace the colors_name - vim.g.colors_name = color_name - - -- Highlight the baseline. - self.highlight('Normal', normal) - - -- Highlight everything else. - for group_name, _ in pairs(highlights) do - self.highlight(group_name, resolve(highlights, group_name, false)) - end -end})