diff --git a/colors/doom-one.vim b/colors/doom-one.vim index cb98aab..706260c 100644 --- a/colors/doom-one.vim +++ b/colors/doom-one.vim @@ -1,623 +1,13 @@ -" !::exe [So] +lua << EOF +vim.cmd('hi clear') +vim.cmd('syntax reset') -" Load lua color utilities -lua require('color') +vim.g['colors_name'] = 'doom-one' -if &background != 'dark' - set background=dark +if vim.opt.background:get() ~= 'dark' then + vim.opt.background = 'dark' end -let colors_name = 'doom-one' - -" Highlighting function {{{ -function! s:_ (name, ...) - let fg = '' - let bg = '' - let attr = '' - - if type(a:1) == 3 - let fg = get(a:1, 0, '') - let bg = get(a:1, 1, '') - let attr = get(a:1, 2, '') - else - let fg = get(a:000, 0, '') - let bg = get(a:000, 1, '') - let attr = get(a:000, 2, '') - end - - let has_props = v:false - - let cmd = 'hi! ' . a:name - if !empty(fg) && fg != 'none' - let cmd .= ' guifg=' . fg - let has_props = v:true - end - if !empty(bg) && bg != 'none' - let cmd .= ' guibg=' . bg - let has_props = v:true - end - if !empty(attr) && attr != 'none' - let cmd .= ' gui=' . attr - let has_props = v:true - end - execute 'hi! clear ' a:name - if has_props - execute cmd - end -endfunc - -" }}} -" Colors {{{ - -let s:base0 = '#1B2229' -let s:base1 = '#1c1f24' -let s:base2 = '#202328' -let s:base3 = '#23272e' -let s:base4 = '#3f444a' -let s:base5 = '#5B6268' -let s:base6 = '#73797e' -let s:base7 = '#9ca0a4' -let s:base8 = '#DFDFDF' -let s:base9 = '#E6E6E6' - -let s:grey = s:base4 -let s:red = '#ff6c6b' -let s:orange = '#da8548' -let s:green = '#98be65' -let s:teal = '#4db5bd' -let s:yellow = '#ECBE7B' -let s:blue = '#51afef' -let s:dark_blue = '#2257A0' -let s:magenta = '#c678dd' -let s:violet = '#a9a1e1' -let s:cyan = '#46D9FF' -let s:dark_cyan = '#5699AF' -let s:white = '#efefef' - -let s:green_alt = '#799033' - -let s:bg = '#282c34' -let s:bg_alt = '#21242b' -let s:bg_highlight = '#21252a' -let s:bg_popup = '#3E4556' -let s:bg_widget = s:bg -let s:bg_statusline = s:bg_popup -let s:bg_visual = s:dark_blue -let s:bg_selection = s:dark_blue -let s:bg_highlighted = '#4A4A45' - -let s:fg = '#bbc2cf' -let s:fg_alt = '#5B6268' -let s:fg_widget = s:fg -let s:fg_conceal = s:base4 -let s:fg_subtle = s:base7 -let s:fg_highlight = luaeval('Lighten("#' . s:fg . '", 0.2)') -let s:fg_linenr = s:base4 - - -let s:highlight = s:blue -let s:highlight_color = s:base0 - -let s:tag = luaeval('Mix("#' . s:blue . '", "#' . s:cyan . '")') - -let s:diff_info_fg = s:blue -let s:diff_info_bg0 = luaeval('Mix("#D8EEFD", "#' . s:bg . '", 0.6)') -let s:diff_info_bg1 = luaeval('Mix("#D8EEFD", "#' . s:bg . '", 0.8)') - -let s:diff_add_fg = s:green -let s:diff_add_fg0 = luaeval('Mix("#' . s:green . '", "#' . s:fg . '", 0.4)') -let s:diff_add_bg0 = luaeval('Mix("#506d5b", "#' . s:bg . '", 0.4)') -let s:diff_add_bg1 = luaeval('Mix("#acf2bd", "#' . s:bg . '", 0.6)') -let s:diff_add_bg2 = luaeval('Mix("#acf2bd", "#' . s:bg . '", 0.8)') - -let s:gh_danger_fg = s:red -let s:gh_danger_fg0 = luaeval('Mix("#' . s:red . '", "#' . s:fg . '", 0.6)') -let s:gh_danger_bg0 = luaeval('Mix("#ffdce0", "#' . s:bg . '", 0.6)') -let s:gh_danger_bg1 = luaeval('Mix("#ffdce0", "#' . s:bg . '", 0.8)') -let s:gh_danger_bg2 = luaeval('Mix("#ffdce0", "#' . s:bg . '", 0.9)') - -" }}} -" General UI {{{ - -call s:_('Normal', s:fg, s:bg) -call s:_('EndOfBuffer', s:bg, s:bg) -call s:_('NormalPopup', s:fg_highlight, s:bg_popup) -call s:_('NormalPopover', s:fg_highlight, s:bg_popup) -call s:_('NormalPopupPrompt', s:base7, luaeval('Darken("#' . s:bg_popup . '", 0.3)'), 'bold') -call s:_('NormalPopupSubtle', s:base6, s:bg_popup) - -call s:_('Cursor', '', s:highlight) -call s:_('SecondaryCursor', '', s:highlight, 'none') - -call s:_('Folded', s:base7, s:bg_highlight, 'none') -call s:_('FoldColumn', s:fg_alt, s:bg_widget, '') -call s:_('SignColumn', '', s:bg_widget, '') -call s:_('ColorColumn', '', s:bg_highlight, '') - -call s:_('CursorLine', '', s:bg_highlight) -call s:_('CursorColumn', '', s:bg_highlight) -call s:_('CursorLineNr', s:fg, s:bg_highlight, 'none') -call s:_('LineNr', s:fg_linenr, s:bg_widget, 'none') - -call s:_('IndentGuide', s:base4, '', '') -call s:_('IndentGuidesEven', s:base4, '', '') -call s:_('IndentGuidesOdd', s:base4, '', '') - -call s:_('TermCursor', s:fg, 'none', 'reverse') -call s:_('TermCursorNC', s:fg_alt, 'none', 'reverse') -call s:_('TermNormal', s:fg, s:bg, '') -hi! link TermNormalNC TermNormal - - -call s:_('Visual', '', s:bg_visual) -call s:_('VisualBold', '', s:bg_visual, 'bold') - -call s:_('WildMenu', s:fg, s:bg_selection) - -call s:_('StatusLine', s:base8, s:bg_statusline, 'none') -call s:_('StatusLineNC', s:base6, s:bg_statusline, 'none') -call s:_('StatusLinePart', s:base6, s:bg_statusline, 'bold') -call s:_('StatusLinePartNC', s:base6, s:bg_statusline, 'bold') - -call s:_('Separator', s:fg_alt, 'none') -call s:_('VertSplit', s:base4, s:bg, 'none') - -call s:_('Pmenu', s:fg, s:bg_popup) -call s:_('PmenuSel', s:highlight_color, s:highlight) -call s:_('PmenuSelBold', s:highlight_color, s:highlight, 'bold') -call s:_('PmenuSbar', '', s:bg_alt) -call s:_('PmenuThumb', '#666660', '#666660') - -if exists('&pumblend') - set pumblend=20 -end - -let s:bg_current = s:bg -let s:bg_visible = s:bg -let s:bg_other = s:base1 - -call s:_('TabLine', s:base7, s:bg_alt, 'bold') -call s:_('TabLineSel', s:blue, s:bg_current, 'bold') -call s:_('TabLineFill', 'none', s:bg_other, 'bold') - -call s:_('BufferCurrent', s:base9, s:bg_current, 'none') -call s:_('BufferCurrentIndex', s:base6, s:bg_current, 'none') -call s:_('BufferCurrentMod', s:yellow, s:bg_current, 'none') -call s:_('BufferCurrentSign', s:blue, s:bg_current, 'none') -call s:_('BufferCurrentTarget', s:red, s:bg_current, 'bold') - -call s:_('BufferVisible', s:base7, s:bg_visible, 'none') -call s:_('BufferVisibleIndex', s:base9, s:bg_visible, 'none') -call s:_('BufferVisibleMod', s:yellow, s:bg_visible, 'none') -call s:_('BufferVisibleSign', s:base4, s:bg_visible, 'none') -call s:_('BufferVisibleTarget', s:red, s:bg_visible, 'bold') - -call s:_('BufferInactive', s:base6, s:bg_other, 'none') -call s:_('BufferInactiveIndex', s:base6, s:bg_other, 'none') -call s:_('BufferInactiveMod', s:yellow, s:bg_other, 'none') -call s:_('BufferInactiveSign', s:base4, s:bg_other, 'none') -call s:_('BufferInactiveTarget', s:red, s:bg_other, 'bold') - -call s:_('BufferTabpages', s:blue, s:bg_statusline, 'bold') -call s:_('BufferTabpageFill', s:base4, s:bg_other, 'bold') - -call s:_('BufferPart', s:diff_info_fg, s:diff_info_bg0, 'bold') - -" }}} -" Search, Highlight, Conceal, Messages {{{ - -" let s:bg_search = color#Mix(s:bg, s:yellow, 0.2) -let s:bg_search = s:dark_blue - -call s:_('Search', s:fg, s:bg_search, 'bold') -call s:_('IncSearch', s:fg, s:bg_search, 'bold') -call s:_('IncSearchCursor', '', '', 'reverse') - -call s:_('Conceal', s:fg_conceal, 'none', '') -call s:_('SpecialKey', s:violet, 'none', 'bold') -call s:_('NonText', s:fg_alt, '', 'bold') -call s:_('MatchParen', s:red, 'none', 'bold') -call s:_('Whitespace', s:base4, '', '') - - -call s:_('Highlight', '', s:bg_highlighted, 'none') -call s:_('HighlightSubtle', '', s:bg_highlighted, 'none') - -call s:_('Question', s:green, '', 'bold') - -call s:_('File', s:fg, '', 'bold') -call s:_('Directory', s:blue, '', 'bold') -call s:_('Section', s:magenta, '', 'bold') -call s:_('Title', s:violet, '', 'bold') - -call s:_('Bold', '', '', 'bold') -call s:_('Emphasis', s:green, '', 'bold') - -" Text levels {{{ - -let s:text_colors = { - \ 'Normal': s:fg, - \ 'Info': s:blue, - \ 'Success': s:green, - \ 'Warning': s:yellow, - \ 'Debug': s:yellow, - \ 'Error': s:red, - \ 'Special': s:violet, - \ 'Muted': s:base7, - \ } -for key in keys(s:text_colors) - call s:_('Text' . key, s:text_colors[key], '', '') - call s:_('Text' . key . 'Bold', s:text_colors[key], '', 'bold') -endfor - -" NOTE/DONE/TODO/FIXME/XXX/DEPRECATED comment highlights - -" }}} - -hi! link Msg TextSuccess -hi! link MoreMsg TextInfo -hi! link WarningMsg TextWarning -hi! link ErrorMsg TextError -hi! link Error TextError -hi! link ModeMsg TextSpecial -hi! link Todo TextWarningBold - - -" }}} -" Main Syntax {{{1 - -call s:_('Tag', s:tag, '', 'underline') -call s:_('Link', s:tag, '', 'underline') -call s:_('URL', s:tag, '', 'underline') -hi! link Underlined URL - -call s:_('Comment', s:base6, '', '') -call s:_('CommentBold', s:base6, '', 'bold') -call s:_('SpecialComment', s:base7, '', 'bold') -hi! link CommentURL URL -hi! link CommentLabel CommentBold -hi! link CommentSection CommentBold -hi! link Noise Comment - -call s:_('Global', s:violet, '', 'bold') -call s:_('PreProc', s:magenta, '', 'none') -call s:_('Macro', s:magenta, '', 'bold') -call s:_('Define', s:magenta, '', 'bold') -call s:_('PreCondit', s:magenta, '', 'bold') -call s:_('Include', s:magenta, '', 'bold') - -call s:_('Repeat', s:blue, '', '') -call s:_('Keyword', s:blue, '', '') -call s:_('Statement', s:blue, '', 'none') -call s:_('Conditional', s:blue, '', '') -call s:_('Exception', s:blue, '', '') -call s:_('Label', s:blue, '', '') - -call s:_('Operator', s:blue, '', '') - -call s:_('Constant', s:violet, '', 'bold') -call s:_('ConstantBuiltin', s:magenta, '', 'bold') - -call s:_('Number', s:orange, '', 'none') -call s:_('Float', s:orange, '', 'none') -call s:_('Boolean', s:orange, '', 'none') -call s:_('Enum', s:orange, '', 'none') - -call s:_('Delimiter', s:blue, '', 'none') -call s:_('DelimiterAlt', s:green_alt, '', 'none') -call s:_('SpecialChar', s:base8, '', 'bold') - -call s:_('String', s:green, '', 'none') -call s:_('StringDelimiter', s:green, '', 'none') - -call s:_('Character', s:green, '', 'bold') - - -call s:_('Special', s:violet, '', 'none') -call s:_('SpecialBold', s:violet, '', 'bold') - - -call s:_('Identifier', luaeval('Lighten("#' . s:magenta . '", 0.4)'), '', 'none') -call s:_('Argument', luaeval('Lighten("#' . s:magenta . '", 0.4)'), '', 'none') -call s:_('Variable', luaeval('Lighten("#' . s:magenta . '", 0.4)'), '', 'none') -call s:_('Variable', luaeval('Lighten("#' . s:magenta . '", 0.4)'), '', 'none') - -call s:_('Function', s:magenta, '', 'none') -call s:_('FunctionBuiltin', s:orange, '', 'bold') -call s:_('Method', s:cyan, '', 'none') - -call s:_('Symbol', s:magenta, '', 'none') -call s:_('Control', s:magenta, '', 'none') -call s:_('PredefinedIdentifier', s:magenta, '', 'none') -call s:_('Predefined', s:magenta, '', 'none') - -call s:_('StaticFunc', s:cyan, '', 'none') -call s:_('Property', s:magenta, '', 'none') - - -call s:_('Type', s:yellow, '', 'none') -call s:_('TypeBuiltin', s:yellow, '', 'bold') -call s:_('StorageClass', s:blue, '', 'none') -call s:_('Class', s:blue, '', 'none') -call s:_('Structure', s:blue, '', 'none') -call s:_('Typedef', s:blue, '', 'none') - -call s:_('Regexp', '#dd0093', 'none', 'none') -call s:_('RegexpSpecial', '#a40073', 'none', 'none') -call s:_('RegexpDelimiter', '#540063', 'none', 'bold') -call s:_('RegexpKey', '#5f0041', 'none', 'bold') - -" }}} -" Diff {{{ - -call s:_('diffLine', s:base8, s:diff_info_bg1, 'none') -call s:_('diffSubName', s:base8, s:diff_info_bg1, 'none') - -hi! clear DiffAdd -hi! clear DiffChange -hi! clear DiffText -hi! clear DiffDelete - -call s:_('DiffAdd', '', s:diff_add_bg2, 'none') -call s:_('DiffChange', '', s:diff_add_bg2, 'none') -call s:_('DiffText', '', s:diff_add_bg0, 'none') -call s:_('DiffDelete', '', s:gh_danger_bg1, 'none') - -call s:_('DiffAdded', s:diff_add_fg0, s:diff_add_bg2, 'none') -call s:_('DiffModified', s:fg, s:diff_info_bg0, 'none') -call s:_('DiffRemoved', s:gh_danger_fg0, s:gh_danger_bg2, 'none') - -call s:_('DiffAddedGutter', s:diff_add_fg, 'none', 'bold') -call s:_('DiffModifiedGutter', s:diff_info_fg, 'none', 'bold') -call s:_('DiffRemovedGutter', s:gh_danger_fg, 'none', 'bold') - -call s:_('DiffAddedGutterLineNr', s:fg_linenr, 'none', 'none') -call s:_('DiffModifiedGutterLineNr', s:fg_linenr, 'none', 'none') -call s:_('DiffRemovedGutterLineNr', s:fg_linenr, 'none', 'none') - -" Gitgutter -hi! link GitGutterAdd DiffAddedGutter -hi! link GitGutterChange DiffModifiedGutter -hi! link GitGutterChangeDelete DiffModifiedGutter -hi! link GitGutterDelete DiffRemovedGutter - -hi! link GitGutterAddLineNr DiffAddedGutterLineNr -hi! link GitGutterChangeLineNr DiffModifiedGutterLineNr -hi! link GitGutterChangeDeleteLineNr DiffModifiedGutterLineNr -hi! link GitGutterDeleteLineNr DiffRemovedGutterLineNr - -" Gitsigns -hi! link GitSignsAdd DiffAddedGutter -hi! link GitSignsChange DiffModifiedGutter -hi! link GitSignsDelete DiffRemovedGutter -hi! link GitSignsChangeDelete DiffModifiedGutter - -" }}} -" Additionnal/Common groups {{{1 - -call s:_('DbgCurrent', '#DEEBFE', '#345FA8', '') -call s:_('DbgBreakPt', '', '#4F0037', '') - -" Jumping around {{{ - -call s:_('JumpTarget', s:red, '', 'bold') - -hi! link EasyMotionTargetDefault JumpTarget -hi! link Sneak JumpTarget -hi! link SneakPluginTarget JumpTarget -hi! link SneakStreakTarget JumpTarget -hi! link SneakStreakMask EasyMotionShadeDefault - -" }}} - -" Other plugins {{{1 - -" Telescope -call s:_('TelescopeMatching', s:green, 'none', 'bold') -call s:_('TelescopeBorder', s:grey) -call s:_('TelescopePromptPrefix', s:blue) -hi! link TelescopeSelection Search -" }}} - -" Languages/Others {{{1 -" Help {{{2 -hi! link helpURL URL - -" PHP {{{2 -hi! link phpFunctions Function -hi! link phpSuperglobal Identifier -hi! link phpQuoteSingle StringDelimiter -hi! link phpQuoteDouble StringDelimiter -hi! link phpBoolean Constant -hi! link phpNull Constant -hi! link phpArrayPair Operator -hi! link phpOperator Normal -hi! link phpRelation Normal -hi! link phpVarSelector Identifier - -" Python {{{2 -hi! link pythonOperator Operator - -" Ruby {{{2 -hi! link rubyRegexpDelimiter RegexpDelimiter -hi! link rubyRegexp Regexp -hi! link rubyRegexpSpecial RegexpSpecial -hi! link rubyPredefinedIdentifier PredefinedIdentifier - -hi! link rubyClass Class -hi! link rubyIdentifier Identifier -hi! link rubyInstanceVariable InstanceVariable -hi! link rubySymbol Symbol -hi! link rubyControl Control - -hi! link rubySharpBang Comment -hi! link rubyConstant Type -hi! link rubyFunction Function - -hi! link rubyGlobalVariable rubyInstanceVariable -hi! link rubyModule rubyClass - -hi! link rubyString String -hi! link rubyStringDelimiter StringDelimiter -hi! link rubyInterpolationDelimiter Identifier - -" Erlang {{{2 -hi! link erlangAtom rubySymbol -hi! link erlangBIF rubyPredefinedIdentifier -hi! link erlangFunction rubyPredefinedIdentifier -hi! link erlangDirective Statement -hi! link erlangNode Identifier - -" CoffeeScript {{{2 -hi! link coffeeRegExp rubyRegexp - -" Lua & Moonscript' {{{2 -hi! link luaOperator Operator - -hi! link moonObject Type -hi! link moonSpecialOp StringDelimiter -hi! link moonSpecialVar Identifier -hi! link moonObjAssign StorageClass -hi! link moonObjAssign StorageClass -hi! link moonConstant Global - -" Objective-C/Cocoa {{{2 -hi! link objcClass Type -hi! link cocoaClass objcClass -hi! link objcSubclass objcClass -hi! link objcSuperclass objcClass -hi! link objcDirective rubyClass -hi! link cocoaFunction Function -hi! link objcMethodName Identifier -hi! link objcMethodArg Normal -hi! link objcMessageName Identifier - -" Built-in Language Server Protocol -if has('nvim') - call s:_('ErrorMsgUnderline', s:red, 'none', 'undercurl') - call s:_('WarningMsgUnderline', s:yellow, 'none', 'undercurl') - call s:_('MoreMsgUnderline', s:blue, 'none', 'undercurl') - call s:_('MsgUnderline', s:green, 'none', 'undercurl') - highlight! link LspDiagnosticsFloatingError ErrorMsg - highlight! link LspDiagnosticsFloatingWarning Warning - highlight! link LspDiagnosticsFloatingInformation MoreMsg - highlight! link LspDiagnosticsFloatingHint Msg - highlight! link LspDiagnosticsDefaultError ErrorMsg - highlight! link LspDiagnosticsDefaultWarning WarningMsg - highlight! link LspDiagnosticsDefaultInformation MoreMsg - highlight! link LspDiagnosticsDefaultHint Msg - highlight! link LspDiagnosticsVirtualTextError ErrorMsg - highlight! link LspDiagnosticsVirtualTextWarning WarningMsg - highlight! link LspDiagnosticsVirtualTextInformation MoreMsg - highlight! link LspDiagnosticsVirtualTextHint Msg - highlight! link LspDiagnosticsUnderlineError ErrorMsgUnderline - highlight! link LspDiagnosticsUnderlineWarning WarningMsgUnderline - highlight! link LspDiagnosticsUnderlineInformation MoreMsgUnderline - highlight! link LspDiagnosticsUnderlineHint MsgUnderline - highlight! link LspDiagnosticsSignError ErrorMsg - highlight! link LspDiagnosticsSignWarning WarningMsg - highlight! link LspDiagnosticsSignInformation MoreMsg - highlight! link LspDiagnosticsSignHint Msg - highlight! link LspReferenceText Bold - highlight! link LspReferenceRead Bold - highlight! link LspReferenceWrite Bold - highlight! link TermCursor Cursor - highlight! link healthError ErrorMsg - highlight! link healthSuccess Msg - highlight! link healthWarning WarningMsg -endif - -" Neovim Treesitter -call s:_('DoomOneTSException', s:blue, '' ,'underline') -call s:_('DoomOneTSAnnotation', s:blue, '', 'bold') -call s:_('DoomOneTSAttribute', s:blue, '', 'bold') -call s:_('DoomOneTSConditional', s:blue, '', 'none') -call s:_('DoomOneTSComment', s:base5, '', 'none') -call s:_('DoomOneTSConstructor', s:yellow, '', 'none') -call s:_('DoomOneTSConstant', s:violet, '', 'none') -call s:_('DoomOneTSConstBuiltin', s:magenta, '', 'none') -call s:_('DoomOneTSConstMacro', s:blue, '', 'bold') -call s:_('DoomOneTSError', s:red, '', 'none') -call s:_('DoomOneTSField', s:violet, '', 'none') -call s:_('DoomOneTSFloat', s:violet, '', 'none') -call s:_('DoomOneTSFunction', s:magenta, '', 'none') -call s:_('DoomOneTSFuncBuiltin', s:magenta, '', 'none') -call s:_('DoomOneTSFuncMacro', s:blue, '', 'none') -call s:_('DoomOneTSInclude', s:blue, '', 'bold') -call s:_('DoomOneTSKeyword', s:blue, '', 'none') -call s:_('DoomOneTSKeywordFunction', s:blue, '', 'none') -call s:_('DoomOneTSLabel', s:blue, '', 'none') -call s:_('DoomOneTSMethod', s:magenta, '', 'none') -call s:_('DoomOneTSNamespace', s:violet, '', 'none') -call s:_('DoomOneTSNumber', s:violet, '', 'none') -call s:_('DoomOneTSOperator', s:blue, '', 'none') -call s:_('DoomOneTSParameter', '#dcaeea', '', 'none') -call s:_('DoomOneTSParameterReference', '#dcaeea', '', 'none') -call s:_('DoomOneTSProperty', '#a9a1e1', '', 'none') -call s:_('DoomOneTSPunctDelimiter', s:fg, '', 'none') -call s:_('DoomOneTSPunctBracket', s:blue, '', 'none') -call s:_('DoomOneTSPunctSpecial', s:blue, '', 'none') -call s:_('DoomOneTSRepeat', s:magenta, '', 'none') -call s:_('DoomOneTSString', s:green, '', 'none') -call s:_('DoomOneTSStringRegex', '#000', '#00bfff', 'bold') -call s:_('DoomOneTSStringEscape', s:blue, '', 'none') -call s:_('DoomOneTSTag', s:blue, '', 'none') -call s:_('DoomOneTSTagDelimiter', s:yellow, '', 'none') -call s:_('DoomOneTSStrong', '', '', 'bold') -call s:_('DoomOneTSURI', s:blue, '', 'bold,underline') -call s:_('DoomOneTSNote', '', '', 'underline') -call s:_('DoomOneTSWarning', s:yellow, '', 'none') -call s:_('DoomOneTSDanger', s:red, '', 'none') -call s:_('DoomOneTSType', s:yellow, '', 'none') -call s:_('DoomOneTSTypeBuiltin', s:magenta, '', 'none') -call s:_('DoomOneTSVariable', '#dcaeea', '', 'none') -call s:_('DoomOneTSVariableBuiltin', s:magenta, '', 'none') - -hi! link TSException DoomOneTSException -hi! link TSAnnotation DoomOneTSAnnotation -hi! link TSAttribute DoomOneTSAttribute -hi! link TSConditional DoomOneTSConditional -hi! link TSComment DoomOneTSComment -hi! link TSConstructor DoomOneTSConstructor -hi! link TSConstant DoomOneTSConstant -hi! link TSConstBuiltin DoomOneTSConstBuiltin -hi! link TSConstMacro DoomOneTSConstMacro -hi! link TSError DoomOneTSError -hi! link TSField DoomOneTSField -hi! link TSFloat DoomOneTSFloat -hi! link TSFunction DoomOneTSFunction -hi! link TSFuncBuiltin DoomOneTSFuncBuiltin -hi! link TSFuncMacro DoomOneTSFuncMacro -hi! link TSInclude DoomOneTSInclude -hi! link TSKeyword DoomOneTSKeyword -hi! link TSKeywordFunction DoomOneTSKeywordFunction -hi! link TSLabel DoomOneTSLabel -hi! link TSMethod DoomOneTSMethod -hi! link TSNamespace DoomOneTSNamespace -hi! link TSNumber DoomOneTSNumber -hi! link TSOperator DoomOneTSOperator -hi! link TSParameter DoomOneTSParameter -hi! link TSParameterReference DoomOneTSParameterReference -hi! link TSProperty DoomOneTSProperty -hi! link TSPunctDelimiter DoomOneTSPunctDelimiter -hi! link TSPunctBracket DoomOneTSPunctBracket -hi! link TSPunctSpecial DoomOneTSPunctSpecial -hi! link TSRepeat DoomOneTSRepeat -hi! link TSString DoomOneTSString -hi! link TSStringRegex DoomOneTSStringRegex -hi! link TSStringEscape DoomOneTSStringEscape -hi! link TSTag DoomOneTSTag -hi! link TSTagDelimiter DoomOneTSTagDelimiter -hi! link TSStrong DoomOneTSStrong -hi! link TSURI DoomOneTSURI -hi! link TSNote DoomOneTSNote -hi! link TSWarning DoomOneTSWarning -hi! link TSDanger DoomOneTSDanger -hi! link TSType DoomOneTSType -hi! link TSTypeBuiltin DoomOneTSTypeBuiltin -hi! link TSVariable DoomOneTSVariable -hi! link TSVariableBuiltin DoomOneTSVariableBuiltin - -" 1}}} - -" 1}}} +package.loaded['colors.doom-one'] = nil +require('colors.doom-one') +EOF diff --git a/lua/colors/doom-one/init.lua b/lua/colors/doom-one/init.lua new file mode 100644 index 0000000..8c1d956 --- /dev/null +++ b/lua/colors/doom-one/init.lua @@ -0,0 +1,605 @@ +-- vim:fdm=marker +-- Vim Color File +-- Name: doom-one +-- Maintainer: http//github.com/NTBBloodbath +-- License: The MIT License (MIT) +-- Based On: http//github.com/romgrk/doom-one.vim and the original Doom Emacs one + +-- Helpers {{{ + +require('colors.utils') + +local g = vim.g +local fn = vim.fn +local api = vim.api + +-- }}} + +-- Customization variables {{{ + +local terminal_colors = g['doom_one_terminal_colors'] or false +local enable_treesitter = g['doom_one_enable_treesitter'] or true +local transparent_bg = g['doom_one_transparent_background'] or false + +-- }}} + +-- Highlight Functions and Color definitions {{{ + +local function high_link(group, link) + api.nvim_command('hi! link ' .. group .. ' ' .. link) +end + +local function high_clear(group) + api.nvim_command('hi! clear ' .. group) +end + +local function highlight(group, styles) + local bg = styles.bg and 'guibg=' .. styles.bg or 'guibg=NONE' + local fg = styles.fg and 'guifg=' .. styles.fg or 'guifg=NONE' + local sp = styles.sp and 'guisp=' .. styles.sp or 'guisp=NONE' + local gui = styles.gui and 'gui=' .. styles.gui or 'gui=NONE' + + api.nvim_command( + 'hi! ' .. group .. ' ' .. bg .. ' ' .. fg .. ' ' .. sp .. ' ' .. gui + ) +end + +local function apply_highlight(groups) + for group, styles in pairs(groups) do + highlight(group, styles) + end +end + +local base0 = '#1B2229' +local base1 = '#1c1f24' +local base2 = '#202328' +local base3 = '#23272e' +local base4 = '#3f444a' +local base5 = '#5B6268' +local base6 = '#73797e' +local base7 = '#9ca0a4' +local base8 = '#DFDFDF' +local base9 = '#E6E6E6' + +local grey = base4 +local red = '#ff6c6b' +local orange = '#da8548' +local green = '#98be65' +local teal = '#4db5bd' +local yellow = '#ECBE7B' +local blue = '#51afef' +local dark_blue = '#2257A0' +local magenta = '#c678dd' +local light_magenta = Lighten(magenta, 0.4) +local violet = '#a9a1e1' +local cyan = '#46D9FF' +local dark_cyan = '#5699AF' +local white = '#efefef' + +local bg = '#282c34' +local bg_alt = '#21242b' +local bg_highlight = '#21252a' +local bg_popup = '#3E4556' +local bg_statusline = bg_popup +local bg_selection = dark_blue +local bg_highlighted = '#4A4A45' + +local fg = '#bbc2cf' +local fg_alt = '#5B6268' +local fg_highlight = Lighten(fg, 0.2) + +local tag = Mix(blue, cyan, 0.5) + +local diff_info_fg = blue +local diff_info_bg0 = Mix('#D8EEFD', bg, 0.6) +local diff_info_bg1 = Mix('#D8EEFD', bg, 0.8) + +local diff_add_fg = green +local diff_add_fg0 = Mix(green, fg, 0.4) +local diff_add_bg0 = Mix('#506d5b', bg, 0.4) +local diff_add_bg1 = Mix('#acf2bd', bg, 0.6) +local diff_add_bg2 = Mix('#acf2bd', bg, 0.8) + +local gh_danger_fg = red +local gh_danger_fg0 = Mix(red, fg, 0.6) +local gh_danger_bg0 = Mix('#ffdce0', bg, 0.6) +local gh_danger_bg1 = Mix('#ffdce0', bg, 0.8) +local gh_danger_bg2 = Mix('#ffdce0', bg, 0.9) + +-- }}} + +-- General UI {{{ + +local general_ui = { + Normal = { fg = fg, bg = transparent_bg and 'NONE' or bg }, + NormalPopup = { fg = fg_highlight, bg = transparent_bg and 'NONE' or bg_popup }, + NormalPopover = { fg = fg_highlight, bg = transparent_bg and 'NONE' or bg_popup }, + NormalPopupPrompt = { fg = base7, bg = transparent_bg and 'NONE' or Darken(bg_popup, 0.3), gui = 'bold' }, + NormalPopupSubtle = { fg = base6, bg = transparent_bg and 'NONE' or bg_popup }, + EndOfBuffer = { fg = bg, bg = transparent_bg and 'NONE' or bg }, + + Visual = { bg = dark_blue }, + VisualBold = { bg = dark_blue, gui = 'bold' }, + + LineNr = { fg = grey, bg = transparent_bg and 'NONE' or bg }, + Cursor = { bg = blue }, + CursorLine = { bg = bg_highlight }, + CursorLineNr = { fg = fg, bg = bg_highlight }, + CursorColumn = { bg = bg_highlight }, + + Folded = { fg = base7, bg = bg_highlight }, + FoldColumn = { fg = fg_alt, bg = bg }, + SignColumn = { bg = transparent_bg and 'NONE' or bg }, + ColorColumn = { bg = bg_highlight }, + + IndentGuide = { fg = grey }, + IndentGuideEven = { fg = grey }, + IndentGuideOdd = { fg = grey }, + + TermCursor = { fg = fg, gui = 'reverse' }, + TermCursorNC = { fg = fg_alt, gui = 'reverse' }, + TermNormal = { fg = fg, bg = bg }, + TermNormalNC = { fg = fg, bg = bg }, + + WildMenu = { fg = fg, bg = dark_blue }, + Separator = { fg = fg_alt }, + VertSplit = { fg = grey, bg = bg }, + + TabLine = { fg = base7, bg = transparent_bg and 'NONE' or bg_alt, gui = 'bold' }, + TabLineSel = { fg = blue, bg = bg, gui = 'bold' }, + TabLineFill = { bg = transparent_bg and 'NONE' or base1, gui = 'bold' }, + + StatusLine = { fg = base8, bg = bg_popup }, + StatusLineNC = { fg = base6, bg = bg_popup }, + StatusLinePart = { fg = base6, bg = bg_popup, gui = 'bold' }, + StatusLinePartNC = { fg = base6, bg = bg_popup, gui = 'bold' }, + + Pmenu = { fg = fg, bg = bg_popup }, + PmenuSel = { fg = base0, bg = blue }, + PmenuSelBold = { fg = base0, bg = blue, gui = 'bold' }, + PmenuSbar = { bg = bg_alt }, + PmenuThumb = { bg = fg }, +} + +if fn.exists('&pumblend') == 1 then + vim.cmd('set pumblend=20') +end + +apply_highlight(general_ui) + +-- }}} + +-- Buffers {{{ + +local buffers_ui = { + BufferCurrent = { fg = base9, bg = bg }, + BufferCurrentIndex = { fg = base6, bg = bg }, + BufferCurrentMod = { fg = yellow, bg = bg }, + BufferCurrentSign = { fg = blue, bg = bg }, + BufferCurrentTarget = { fg = red, bg = bg, gui = 'bold' }, + + BufferVisible = { fg = base7, bg = bg }, + BufferVisibleIndex = { fg = base9, bg = bg }, + BufferVisibleMod = { fg = yellow, bg = bg }, + BufferVisibleSign = { fg = base4, bg = bg }, + BufferVisibleTarget = { fg = red, bg = bg, gui = 'bold' }, + + BufferInactive = { fg = base6, bg = base1 }, + BufferInactiveIndex = { fg = base6, bg = base1 }, + BufferInactiveMod = { fg = yellow, bg = base1 }, + BufferInactiveSign = { fg = base4, bg = base1 }, + BufferInactiveTarget = { fg = red, bg = base1, gui = 'bold' }, + + BufferTabpages = { fg = blue, bg = bg_statusline, gui = 'bold' }, + BufferTabpageFill = { fg = base4, bg = base1, gui = 'bold' }, + + BufferPart = { fg = diff_info_fg, bg = diff_info_bg0, gui = 'bold' }, +} + +apply_highlight(buffers_ui) + +-- }}} + +-- Search, Highlight. Conceal, Messgaes {{{ + +local search_high_ui = { + Search = { fg = fg, bg = dark_blue, gui = 'bold' }, + IncSearch = { fg = fg, bg = dark_blue, gui = 'bold' }, + IncSearchCursor = { gui = 'reverse' }, + + Conceal = { fg = grey, gui = 'none' }, + SpecialKey = { fg = violet, gui = 'bold' }, + NonText = { fg = fg_alt, gui = 'bold' }, + MatchParen = { fg = red, gui = 'bold' }, + Whitespace = { fg = grey }, + + Highlight = { bg = bg_highlighted }, + HighlightSubtle = { bg = bg_highlighted }, + + Question = { fg = green, gui = 'bold' }, + + File = { fg = fg }, + Directory = { fg = violet, gui = 'bold' }, + Title = { fg = violet, gui = 'bold' }, + + Bold = { gui = 'bold' }, + Emphasis = { fg = green, gui = 'bold' }, +} + +apply_highlight(search_high_ui) + +-- }}} + +-- Text levels {{{ + +local text_colors = { + Normal = fg, + Info = blue, + Success = green, + Warning = yellow, + Debug = yellow, + Error = red, + Special = violet, + Muted = base7, +} + +for key, _ in pairs(text_colors) do + apply_highlight({ + ['Text' .. key] = { + fg = text_colors[key], + } + }) + apply_highlight({ + ['Text' .. key .. 'Bold'] = { + fg = text_colors[key], + gui = 'bold', + } + }) +end + +high_link('Msg', 'TextSuccess') +high_link('MoreMsg', 'TextInfo') +high_link('WarningMsg', 'TextWarning') +high_link('Error', 'TextError') +high_link('ErrorMsg', 'TextError') +high_link('ModeMsg', 'TextSpecial') +high_link('Todo', 'TextWarningBold') + +-- }}} + +-- Main Syntax {{{ + +local main_syntax = { + Tag = { fg = tag, gui = 'bold' }, + Link = { fg = tag, sp = 'undercurl' }, + URL = { fg = tag, sp = 'undercurl' }, + Underlined = { fg = tag, sp = 'underline' }, + + Comment = { fg = base5 }, + CommentBold = { fg = base5, gui = 'bold' }, + SpecialComment = { fg = base7, gui = 'bold' }, + + Macro = { fg = violet }, + Define = { fg = violet, gui = 'bold' }, + Include = { fg = violet, gui = 'bold' }, + PreProc = { fg = violet, gui = 'bold' }, + PreCondit = { fg = violet, gui = 'bold' }, + + Label = { fg = blue }, + Repeat = { fg = blue }, + Keyword = { fg = blue }, + Operator = { fg = blue }, + Delimiter = { fg = blue }, + Statement = { fg = blue }, + Exception = { fg = blue }, + Conditional = { fg = blue }, + + Variable = { fg = '#8B93E6' }, + VariableBuiltin = { fg = '8B93E6', gui = 'bold' }, + Constant = { fg = violet, gui = 'bold' }, + + Number = { fg = orange }, + Float = { fg = orange }, + Boolean = { fg = orange }, + Enum = { fg = orange }, + + Character = { fg = violet, gui = 'bold' }, + SpecialChar = { fg = base8, gui = 'bold' }, + + String = { fg = green }, + StringDelimiter = { fg = green }, + + Special = { fg = violet }, + SpecialBold = { fg = violet, gui = 'bold' }, + + Argument = { fg = light_magenta }, + Field = { fg = violet }, + Identifier = { fg = light_magenta }, + Function = { fg = magenta }, + FunctionBuiltin = { fg = magenta, gui = 'bold' }, + Method = { fg = violet }, + + Type = { fg = yellow }, + TypeBuiltin = { fg = yellow, gui = 'bold' }, + StorageClass = { fg = blue }, + Class = { fg = blue }, + Structure = { fg = blue }, + Typedef = { fg = blue }, + + Regexp = { fg = '#dd0093' }, + RegexpSpecial = { fg = '#a40073' }, + RegexpDelimiter = { fg = '#540063', gui = 'bold' }, + RegexpKey = { fg = '#5f0041', gui = 'bold' }, +} + +apply_highlight(main_syntax) +high_link('CommentURL', 'URL') +high_link('CommentLabel', 'CommentBold') +high_link('CommentSection', 'CommentBold') +high_link('Noise', 'Comment') + +-- }}} + +-- Diff {{{ + +local diff = { + diffLine = { fg = base8, bg = diff_info_bg1 }, + diffSubName = { fg = base8, bg = diff_info_bg1 }, + + DiffAdd = { bg = diff_add_bg2 }, + DiffChange = { bg = diff_add_bg2 }, + DiffText = { bg = diff_add_bg0 }, + DiffDelete = { bg = gh_danger_bg1 }, + + DiffAdded = { fg = diff_add_fg0, bg = diff_add_bg2 }, + DiffModified = { fg = fg, bg = diff_info_bg0 }, + DiffRemoved = { fg = gh_danger_fg0, bg = gh_danger_bg2 }, + + DiffAddedGutter = { fg = diff_add_fg, gui = 'bold' }, + DiffModifiedGutter = { fg = diff_info_fg, gui = 'bold' }, + DiffRemovedGutter = { fg = gh_danger_fg, gui = 'bold' }, + + DiffAddedGutterLineNr = { fg = grey }, + DiffModifiedGutterLineNr = { fg = grey }, + DiffRemovedGutterLineNr = { fg = grey }, +} + +high_clear('DiffAdd') +high_clear('DiffChange') +high_clear('DiffText') +high_clear('DiffDelete') +apply_highlight(diff) + +-- }}} + +-- Plugins {{{ + +-- Gitgutter {{{ + +high_link('GitGutterAdd', 'DiffAddedGutter') +high_link('GitGutterChange', 'DiffModifiedGutter') +high_link('GitGutterDelete', 'DiffRemovedGutter') +high_link('GitGutterChangeDelete', 'DiffModifiedGutter') + +high_link('GitGutterAddLineNr', 'DiffAddedGutterLineNr') +high_link('GitGutterChangeLineNr', 'DiffModifiedGutterLineNr') +high_link('GitGutterDeleteLineNr', 'DiffRemovedGutterLineNr') +high_link('GitGutterChangeDeleteLineNr', 'DiffModifiedGutterLineNr') + +-- }}} + +-- Gitsigns {{{ + +high_link('GitSignsAdd', 'DiffAddedGutter') +high_link('GitSignsChange', 'DiffModifiedGutter') +high_link('GitSignsDelete', 'DiffRemovedGutter') +high_link('GitSignsChangeDelete', 'DiffModifiedGutter') + +-- }}} + +-- Telescope {{{ + +local telescope = { + TelescopeSelection = { fg = yellow, gui = 'bold' }, + TelescopeSelectionCaret = { fg = blue }, + TelescopeMultiSelection = { fg = grey }, + TelescopeNormal = { fg = fg }, + TelescopeMatching = { fg = green, gui = 'bold' }, + TelescopePromptPrefix = { fg = blue }, + TelescopeBorder = { fg = blue }, + TelescopePromptBorder = { fg = blue }, + TelescopeResultsBorder = { fg = blue }, + TelescopePreviewBorder = { fg = blue }, +} + +apply_highlight(telescope) +high_link('TelescopePrompt', 'TelescopeNormal') + +-- }}} + +-- NvimTree {{{ + +local nvim_tree = { + NvimTreeFolderName = { fg = blue, gui = 'bold' }, + NvimTreeRootFolder = { fg = green }, + NvimTreeEmptyFolderName = { fg = fg_alt, gui = 'bold' }, + NvimTreeSymlink = { fg = fg, sp = 'underline' }, + NvimTreeExecFile = { fg = green, gui = 'bold' }, + NvimTreeImageFile = { fg = blue }, + NvimTreeOpenedFile = { fg = fg_alt }, + NvimTreeSpecialFile = { fg = fg, sp = 'underline' }, + NvimTreeMarkdownFile = { fg = fg, sp = 'underline' }, +} + +apply_highlight(nvim_tree) +high_link('NvimTreeGitDirty', 'DiffModifiedGutter') +high_link('NvimTreeGitStaged', 'DiffModifiedGutter') +high_link('NvimTreeGitMerge', 'DiffModifiedGutter') +high_link('NvimTreeGitRenamed', 'DiffModifiedGutter') +high_link('NvimTreeGitNew', 'DiffAddedGutter') +high_link('NvimTreeGitDeleted', 'DiffRemovedGutter') + +high_link('NvimTreeIndentMarker', 'IndentGuide') +high_link('NvimTreeOpenedFolderName', 'NvimTreeFolderName') + +-- }}} + +-- }}} + +-- LSP {{{ + +local msg_underline = { + ErrorMsgUnderline = { fg = red, sp = 'undercurl' }, + WarningMsgUnderline = { fg = yellow, sp = 'undercurl' }, + MoreMsgUnderline = { fg = blue, sp = 'undercurl' }, + MsgUnderline = { fg = green, sp = 'undercurl' }, +} + +apply_highlight(msg_underline) +high_link('LspDiagnosticsFloatingError', 'ErrorMsg') +high_link('LspDiagnosticsFloatingWarning', 'Warning') +high_link('LspDiagnosticsFloatingInformation', 'MoreMsg') +high_link('LspDiagnosticsFloatingHint', 'Msg') +high_link('LspDiagnosticsDefaultError', 'ErrorMsg') +high_link('LspDiagnosticsDefaultWarning', 'WarningMsg') +high_link('LspDiagnosticsDefaultInformation', 'MoreMsg') +high_link('LspDiagnosticsDefaultHint', 'Msg') +high_link('LspDiagnosticsVirtualTextError', 'ErrorMsg') +high_link('LspDiagnosticsVirtualTextWarning', 'WarningMsg') +high_link('LspDiagnosticsVirtualTextInformation', 'MoreMsg') +high_link('LspDiagnosticsVirtualTextHint', 'Msg') +high_link('LspDiagnosticsUnderlineError', 'ErrorMsgUnderline') +high_link('LspDiagnosticsUnderlineWarning', 'WarningMsgUnderline') +high_link('LspDiagnosticsUnderlineInformation', 'MoreMsgUnderline') +high_link('LspDiagnosticsUnderlineHint', 'MsgUnderline') +high_link('LspDiagnosticsSignError', 'ErrorMsg') +high_link('LspDiagnosticsSignWarning', 'WarningMsg') +high_link('LspDiagnosticsSignInformation', 'MoreMsg') +high_link('LspDiagnosticsSignHint', 'Msg') +high_link('LspReferenceText', 'Bold') +high_link('LspReferenceRead', 'Bold') +high_link('LspReferenceWrite', 'Bold') +high_link('TermCursor', 'Cursor') +high_link('healthError', 'ErrorMsg') +high_link('healthSuccess', 'Msg') +high_link('healthWarning', 'WarningMsg') + +-- LspSaga {{{ + +local lspsaga = { + SagaShadow = { bg = bg }, + LspSagaDiagnosticHeader = { fg = red }, +} + +apply_highlight(lspsaga) +high_link('LspSagaDiagnosticBorder', 'Normal') +high_link('LspSagaDiagnosticTruncateLine', 'Normal') +high_link('LspFloatWinBorder', 'Normal') +high_link('LspSagaBorderTitle', 'Title') +high_link('TargetWord', 'Error') +high_link('ReferencesCount', 'Title') +high_link('ReferencesIcon', 'Special') +high_link('DefinitionCount', 'Title') +high_link('TargetFileName', 'Comment') +high_link('DefinitionIcon', 'Special') +high_link('ProviderTruncateLine', 'Normal') +high_link('LspSagaFinderSelection', 'Search') +high_link('DiagnosticTruncateLine', 'Normal') +high_link('DiagnosticError', 'LspDiagnosticsDefaultError') +high_link('DiagnosticWarning', 'LspDiagnosticsDefaultWarning') +high_link('DiagnosticInformation', 'LspDiagnosticsDefaultInformation') +high_link('DiagnosticHint', 'LspDiagnosticsDefaultHint') +high_link('DefinitionPreviewTitle', 'Title') +high_link('LspSagaShTruncateLine', 'Normal') +high_link('LspSagaDocTruncateLine', 'Normal') +high_link('LineDiagTuncateLine', 'Normal') +high_link('LspSagaCodeActionTitle', 'Title') +high_link('LspSagaCodeActionTruncateLine', 'Normal') +high_link('LspSagaCodeActionContent', 'Normal') +high_link('LspSagaRenamePromptPrefix', 'Normal') +high_link('LspSagaRenameBorder', 'Bold') +high_link('LspSagaHoverBorder', 'Bold') +high_link('LspSagaSignatureHelpBorder', 'Bold') +high_link('LspSagaCodeActionBorder', 'Bold') +high_link('LspSagaDefPreviewBorder', 'Bold') +high_link('LspLinesDiagBorder', 'Bold') + +-- }}} + +-- }}} + +-- TreeSitter {{{ + +if enable_treesitter then + high_link('TSException', 'Exception') + high_link('TSAnnotation', 'Annotation') + high_link('TSAttribute', 'Attribute') + high_link('TSConditional', 'Conditional') + high_link('TSComment', 'Comment') + high_link('TSConstructor', 'Constructor') + high_link('TSConstant', 'Constant') + high_link('TSConstBuiltin', 'ConstBuiltin') + high_link('TSConstMacro', 'ConstMacro') + high_link('TSError', 'Error') + high_link('TSField', 'Field') + high_link('TSFloat', 'Float') + high_link('TSFunction', 'Function') + high_link('TSFuncBuiltin', 'FuncBuiltin') + high_link('TSFuncMacro', 'FuncMacro') + high_link('TSInclude', 'Include') + high_link('TSKeyword', 'Keyword') + high_link('TSKeywordFunction', 'KeywordFunction') + high_link('TSLabel', 'Label') + high_link('TSMethod', 'Method') + high_link('TSNamespace', 'Namespace') + high_link('TSNumber', 'Number') + high_link('TSOperator', 'Operator') + high_link('TSParameter', 'Parameter') + high_link('TSParameterReference', 'ParameterReference') + high_link('TSProperty', 'Property') + high_link('TSPunctDelimiter', 'PunctDelimiter') + high_link('TSPunctBracket', 'PunctBracket') + high_link('TSPunctSpecial', 'PunctSpecial') + high_link('TSRepeat', 'Repeat') + high_link('TSString', 'String') + high_link('TSStringRegex', 'StringRegex') + high_link('TSStringEscape', 'StringEscape') + high_link('TSTag', 'Tag') + high_link('TSTagDelimiter', 'TagDelimiter') + high_link('TSStrong', 'Strong') + high_link('TSURI', 'URI') + high_link('TSNote', 'Note') + high_link('TSWarning', 'Warning') + high_link('TSDanger', 'Danger') + high_link('TSType', 'Type') + high_link('TSTypeBuiltin', 'TypeBuiltin') + high_link('TSVariable', 'Variable') + high_link('TSVariableBuiltin', 'VariableBuiltin') +end + +-- }}} + +-- Neovim Terminal Colors {{{ + +if terminal_colors then + g.terminal_color_0 = bg + g.terminal_color_1 = red + g.terminal_color_2 = green + g.terminal_color_3 = yellow + g.terminal_color_4 = blue + g.terminal_color_5 = violet + g.terminal_color_6 = cyan + g.terminal_color_7 = fg + g.terminal_color_8 = grey + g.terminal_color_9 = red + g.terminal_color_10 = green + g.terminal_color_11 = orange + g.terminal_color_12 = blue + g.terminal_color_13 = violet + g.terminal_color_14 = cyan + g.terminal_color_15 = white + g.terminal_color_background = bg_alt + g.terminal_color_foreground = fg_alt +end + +-- }}} diff --git a/lua/color.lua b/lua/colors/utils/init.lua similarity index 98% rename from lua/color.lua rename to lua/colors/utils/init.lua index 903c5e9..04669c9 100644 --- a/lua/color.lua +++ b/lua/colors/utils/init.lua @@ -5,8 +5,8 @@ local vim = vim ------------------------------------------------------------------------------- ---Functions: ---{{{1 +-- Functions: +-- {{{1 -- Convert RGB to Hex color. -- @param r Red value @@ -194,7 +194,7 @@ function Mix(first, second, percentage) local r = interpolate(first_rgb[1], second_rgb[1], amount) local g = interpolate(first_rgb[2], second_rgb[2], amount) - b = interpolate(first_rgb[3], second_rgb[3], amount) + local b = interpolate(first_rgb[3], second_rgb[3], amount) return RGB_to_Hex(r, g, b) end