diff --git a/colors/doom-one.lua b/colors/doom-one.lua index 79c0eeb..c2ceb39 100644 --- a/colors/doom-one.lua +++ b/colors/doom-one.lua @@ -6,4 +6,4 @@ end vim.g["colors_name"] = "doom-one" package.loaded["colors.doom-one"] = nil -require("colors.doom-one") +require("colors.doom-one").load_colorscheme() diff --git a/lua/colors/doom-one/init.lua b/lua/colors/doom-one/init.lua index 89e65d5..6739f1a 100644 --- a/lua/colors/doom-one/init.lua +++ b/lua/colors/doom-one/init.lua @@ -14,16 +14,18 @@ local config = require('colors.doom-one.config') -- }}} --- Customization variables {{{ - local configuration = config.get() --- Establish the user configurations --- @param user_configs table doom_one.setup = function(user_configs) configuration = config.set(user_configs or {}) + -- Reload colorscheme with user configurations override + doom_one.load_colorscheme() end +-- Customization variables {{{ + local transparent_bg = configuration.transparent_background if configuration.cursor_coloring then @@ -204,775 +206,779 @@ end -- }}} --- 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 utils.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 = base5, 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 = bg_alt, - gui = 'bold', - }, - TabLineSel = { fg = blue, bg = bg, gui = 'bold' }, - TabLineFill = { bg = base1, gui = 'bold' }, - - StatusLine = { fg = base8, bg = base3 }, - 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_highlight }, - PmenuSel = { fg = base0, bg = blue }, - PmenuSelBold = { fg = base0, bg = blue, gui = 'bold' }, - PmenuSbar = { bg = bg_alt }, - PmenuThumb = { bg = fg }, -} - -if vim.opt.pumblend == 1 then - vim.opt.pumblend = 20 -end - -apply_highlight(general_ui) - --- }}} - --- Search, Highlight. Conceal, Messages {{{ - -local search_high_ui = { - Search = { fg = fg, bg = dark_blue, gui = 'bold' }, - Substitute = { fg = red, gui = 'strikethrough,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 = green, gui = 'underline' }, - URL = { fg = green, gui = 'underline' }, - Underlined = { fg = tag, gui = 'underline' }, - - Comment = { - fg = fg_alt, - gui = configuration.italic_comments and 'italic' or 'NONE', - }, - CommentBold = { fg = fg_alt, 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 = light_bg and orange or blue }, - Repeat = { fg = light_bg and orange or blue }, - Keyword = { fg = light_bg and orange or blue }, - Operator = { fg = light_bg and orange or blue }, - Delimiter = { fg = light_bg and orange or blue }, - Statement = { fg = light_bg and orange or blue }, - Exception = { fg = light_bg and orange or blue }, - Conditional = { fg = light_bg and orange or blue }, - - Variable = { fg = '#8B93E6' }, - VariableBuiltin = { fg = '#8B93E6', gui = 'bold' }, - Constant = { fg = violet, gui = 'bold' }, - - Number = { fg = light_bg and yellow or orange }, - Float = { fg = light_bg and yellow or orange }, - Boolean = { fg = light_bg and yellow or orange, gui = 'bold' }, - Enum = { fg = light_bg and yellow or 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' }, - - Field = { fg = violet }, - Argument = { fg = light_magenta }, - Attribute = { fg = light_magenta }, - Identifier = { fg = light_magenta }, - Property = { fg = magenta }, - Function = { fg = magenta }, - FunctionBuiltin = { fg = light_magenta, gui = 'bold' }, - KeywordFunction = { fg = light_bg and orange or blue }, - Method = { fg = violet }, - - Type = { fg = yellow }, - TypeBuiltin = { fg = yellow, gui = 'bold' }, - StorageClass = { fg = light_bg and orange or blue }, - Class = { fg = light_bg and orange or blue }, - Structure = { fg = light_bg and orange or blue }, - Typedef = { fg = light_bg and orange or 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_bg1 }, - DiffChange = { bg = diff_add_bg1 }, - DiffText = { bg = diff_add_bg0 }, - DiffDelete = { bg = gh_danger_bg0 }, - - DiffAdded = { fg = diff_add_fg0, bg = diff_add_bg1 }, - DiffModified = { fg = fg, bg = diff_info_bg0 }, - DiffRemoved = { fg = gh_danger_fg0, bg = gh_danger_bg1 }, - - 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) - --- }}} - --- Markdown {{{ -local markdown = { - markdownCode = { bg = bg_highlight }, - markdownCodeBlock = { bg = bg_highlight }, - markdownH1 = { gui = 'bold' }, - markdownH2 = { gui = 'bold' }, - markdownLinkText = { gui = 'underline' }, -} - -apply_highlight(markdown) ---}}} - --- Plugins {{{ - --- barbar.nvim {{{ - -if configuration.plugins_integrations.barbar then - local barbar = { - 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(barbar) -end - --- }}} +--- Load the colorscheme +doom_one.load_colorscheme = function() + -- General UI {{{ --- BufferLine {{{ - -if configuration.plugins_integrations.bufferline and transparent_bg then - -- NOTE: this is a temporal workaround for using bufferline with a transparent - -- background and having highlighting, please refer to - -- https://github.com/NTBBloodbath/doom-one.nvim/issues/8#issuecomment-883737667 - -- for more information about this - local bufferline = { - BufferLineTab = { fg = fg, bg = bg }, - BufferLineTabClose = { fg = fg, bg = bg, gui = 'bold' }, - BufferLineTabSelected = { fg = blue, bg = bg, gui = 'bold,italic' }, - BufferLineBackground = { fg = fg_alt, bg = bg }, - BufferLineBufferSelected = { fg = fg, bg = bg, gui = 'bold,italic' }, - BufferLineBufferVisible = { fg = fg, bg = bg }, - BufferLineCloseButton = { fg = fg_alt, bg = bg }, - BufferLineCloseButtonSelected = { fg = fg, bg = bg, gui = 'bold' }, - BufferLineCloseButtonVisible = { fg = fg, bg = bg }, - BufferLineModified = { fg = green, bg = bg }, - BufferLineModifiedSelected = { fg = green, bg = bg }, - BufferLineModifiedVisible = { fg = green, bg = bg }, - BufferLineFill = { fg = blue, bg = bg_alt }, - BufferLineIndicatorSelected = { fg = blue, bg = bg }, - BufferLineSeparator = { fg = base0, bg = bg }, - BufferLineSeparatorSelected = { fg = base0, bg = bg }, - BufferLineSeparatorVisible = { fg = base0, bg = bg_alt }, - BufferLinePick = { fg = fg, bg = bg, gui = 'bold' }, - BufferLinePickSelected = { fg = blue, bg = bg, gui = 'bold,italic' }, - BufferLinePickVisible = { fg = fg, bg = bg_alt }, - - BufferLineDiagnostic = { fg = fg, bg = bg, sp = fg }, - BufferLineDiagnosticSelected = { fg = fg, bg = bg, sp = fg }, - BufferLineDiagnosticVisible = { fg = fg, bg = bg, sp = fg }, - - BufferLineInfo = { fg = cyan, bg = bg, sp = cyan, gui = 'bold' }, - BufferLineInfoSelected = { - fg = cyan, - bg = bg, - sp = cyan, - gui = 'bold,italic', + 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, }, - BufferLineInfoVisible = { fg = cyan, bg = bg, sp = cyan, gui = 'bold' }, - BufferLineInfoDiagnostic = { fg = cyan, bg = bg, sp = cyan }, - BufferLineInfoDiagnosticSelected = { fg = cyan, bg = bg, sp = cyan }, - BufferLineInfoDiagnosticVisible = { fg = cyan, bg = bg, sp = cyan }, - BufferLineError = { fg = red, bg = bg, sp = red, gui = 'bold' }, - BufferLineErrorSelected = { - fg = red, - bg = bg, - sp = red, - gui = 'bold,italic', + NormalPopover = { + fg = fg_highlight, + bg = transparent_bg and 'NONE' or bg_popup, }, - BufferLineErrorVisible = { fg = red, bg = bg, sp = red, gui = 'bold' }, - BufferLineErrorDiagnostic = { fg = red, bg = bg, sp = red }, - BufferLineErrorDiagnosticSelected = { fg = red, bg = bg, sp = red }, - BufferLineErrorDiagnosticVisible = { fg = red, bg = bg, sp = red }, - BufferLineWarning = { - fg = yellow, - bg = bg, - sp = yellow, - gui = 'bold,italic', + NormalPopupPrompt = { + fg = base7, + bg = transparent_bg and 'NONE' or utils.Darken(bg_popup, 0.3), + gui = 'bold', }, - BufferLineWarningSelected = { - fg = yellow, - bg = bg, - sp = yellow, - gui = 'bold,italic', + NormalPopupSubtle = { + fg = base6, + bg = transparent_bg and 'NONE' or bg_popup, }, - BufferLineWarningVisible = { - fg = yellow, - bg = bg, - sp = yellow, + 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 = base5, 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 = bg_alt, gui = 'bold', }, - BufferLineWarningDiagnostic = { fg = yellow, bg = bg, sp = yellow }, - BufferLineWarningDiagnosticSelected = { fg = yellow, bg = bg, sp = yellow }, - BufferLineWarningDiagnosticVisible = { fg = yellow, bg = bg, sp = yellow }, - } - - apply_highlight(bufferline) -end - --- }}} - --- Gitgutter {{{ - -if configuration.plugins_integrations.gitgutter then - 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') -end - --- }}} - --- Gitsigns {{{ - -if configuration.plugins_integrations.gitsigns then - high_link('GitSignsAdd', 'DiffAddedGutter') - high_link('GitSignsChange', 'DiffModifiedGutter') - high_link('GitSignsDelete', 'DiffRemovedGutter') - high_link('GitSignsChangeDelete', 'DiffModifiedGutter') -end - --- }}} - --- Telescope {{{ - -if configuration.plugins_integrations.telescope then - local telescope = { - TelescopeSelection = { fg = yellow, gui = 'bold' }, - TelescopeSelectionCaret = { fg = light_bg and orange or blue }, - TelescopeMultiSelection = { fg = grey }, - TelescopeNormal = { fg = fg }, - TelescopeMatching = { fg = green, gui = 'bold' }, - TelescopePromptPrefix = { fg = light_bg and orange or blue }, - TelescopeBorder = { fg = light_bg and orange or blue }, - TelescopePromptBorder = { fg = light_bg and orange or blue }, - TelescopeResultsBorder = { fg = light_bg and orange or blue }, - TelescopePreviewBorder = { fg = light_bg and orange or blue }, - } - - apply_highlight(telescope) - high_link('TelescopePrompt', 'TelescopeNormal') -end - --- }}} - --- Neogit {{{ - -if configuration.plugins_integrations.neogit then - local neogit = { - NeogitDiffAdd = { fg = ng_add_fg, bg = ng_add_bg}, - NeogitDiffAddHighlight = { fg = ng_add_fg_hl, bg = ng_add_bg_hl, gui = 'bold' }, - NeogitDiffDelete = { fg = ng_delete_fg, bg = ng_delete_bg }, - NeogitDiffDeleteHighlight = { fg = ng_delete_fg_hl, bg = ng_delete_bg_hl, gui = 'bold' }, - NeogitDiffContext = { fg = fg_alt, bg = bg }, - NeogitDiffContextHighlight = { fg = fg, bg = bg_alt }, - NeogitHunkHeader = { fg = bg, bg = ng_header_bg }, - NeogitHunkHeaderHighlight = { fg = bg_alt, bg = ng_header_bg_hl, gui = 'bold' }, - NeogitStagedChanges = { fg = blue, gui = 'bold' }, - NeogitStagedChangesRegion = { bg = bg_highlight }, - NeogitStashes = { fg = blue, gui = 'bold' }, - NeogitUnstagedChanges = { fg = blue, gui = 'bold' }, - NeogitUntrackedfiles = { fg = blue, gui = 'bold' }, + TabLineSel = { fg = blue, bg = bg, gui = 'bold' }, + TabLineFill = { bg = base1, gui = 'bold' }, + + StatusLine = { fg = base8, bg = base3 }, + 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_highlight }, + PmenuSel = { fg = base0, bg = blue }, + PmenuSelBold = { fg = base0, bg = blue, gui = 'bold' }, + PmenuSbar = { bg = bg_alt }, + PmenuThumb = { bg = fg }, } - apply_highlight(neogit) -end - --- }}} + if vim.opt.pumblend == 1 then + vim.opt.pumblend = 20 + end --- NvimTree {{{ - -if configuration.plugins_integrations.nvim_tree then - local nvim_tree = { - NvimTreeFolderName = { fg = light_bg and base9 or blue, gui = 'bold' }, - NvimTreeRootFolder = { fg = green }, - NvimTreeEmptyFolderName = { fg = fg_alt, gui = 'bold' }, - NvimTreeSymlink = { fg = fg, gui = 'underline' }, - NvimTreeExecFile = { fg = green, gui = 'bold' }, - NvimTreeImageFile = { fg = light_bg and orange or blue }, - NvimTreeOpenedFile = { fg = fg_alt }, - NvimTreeSpecialFile = { fg = fg, gui = 'underline' }, - NvimTreeMarkdownFile = { fg = fg, gui = 'underline' }, - } + apply_highlight(general_ui) - 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') -end + -- Search, Highlight. Conceal, Messages {{{ --- }}} + local search_high_ui = { + Search = { fg = fg, bg = dark_blue, gui = 'bold' }, + Substitute = { fg = red, gui = 'strikethrough,bold' }, + IncSearch = { fg = fg, bg = dark_blue, gui = 'bold' }, + IncSearchCursor = { gui = 'reverse' }, --- Dashboard {{{ + Conceal = { fg = grey, gui = 'none' }, + SpecialKey = { fg = violet, gui = 'bold' }, + NonText = { fg = fg_alt, gui = 'bold' }, + MatchParen = { fg = red, gui = 'bold' }, + Whitespace = { fg = grey }, -if configuration.plugins_integrations.dashboard then - local dashboard = { - dashboardHeader = { fg = '#586268' }, - dashboardCenter = { fg = light_bg and orange or blue }, - dashboardShortcut = { fg = '#9788b9' }, - } + Highlight = { bg = bg_highlighted }, + HighlightSubtle = { bg = bg_highlighted }, + LspHighlight = { bg = bg_highlight, style = 'bold' }, - apply_highlight(dashboard) - high_link('dashboardFooter', 'dashboardHeader') -end + Question = { fg = green, gui = 'bold' }, --- }}} + File = { fg = fg }, + Directory = { fg = violet, gui = 'bold' }, + Title = { fg = violet, gui = 'bold' }, --- Startify {{{ - -if configuration.plugins_integrations.startify then - local startify = { - StartifyHeader = { fg = bg_popup }, - StartifyBracket = { fg = bg_popup }, - StartifyNumber = { fg = blue }, - StartifyPath = { fg = violet }, - StartifySlash = { fg = violet }, - StartifyFile = { fg = green }, + Bold = { gui = 'bold' }, + Emphasis = { fg = green, gui = 'bold' }, } - apply_highlight(startify) -end + apply_highlight(search_high_ui) --- }}} + -- }}} --- WhichKey {{{ + -- Text levels {{{ -if configuration.plugins_integrations.whichkey then - local whichkey = { - WhichKey = { fg = light_bg and orange or blue }, - WhichKeyGroup = { fg = magenta }, - WhichKeyDesc = { fg = magenta }, - WhichKeySeparator = { fg = base5 }, - WhichKeyFloat = { bg = base2 }, - WhichKeyValue = { fg = grey }, + local text_colors = { + Normal = fg, + Info = blue, + Success = green, + Warning = yellow, + Debug = yellow, + Error = red, + Special = violet, + Muted = base7, } - apply_highlight(whichkey) -end - --- }}} - --- indent-blankline {{{ - -if configuration.plugins_integrations.indent_blankline then - local indent_blankline = { - IndentBlanklineChar = { - fg = base4, - cterm = 'nocombine', - gui = 'nocombine', - }, - IndentBlanklineContextChar = { - fg = blue, - cterm = 'nocombine', - gui = 'nocombine', - }, - IndentBlanklineSpaceChar = { - fg = base4, - cterm = 'nocombine', - gui = 'nocombine', - }, - IndentBlanklineSpaceCharBlankline = { - fg = base4, - cterm = 'nocombine', - gui = 'nocombine', + 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 = green, gui = 'underline' }, + URL = { fg = green, gui = 'underline' }, + Underlined = { fg = tag, gui = 'underline' }, + + Comment = { + fg = fg_alt, + gui = configuration.italic_comments and 'italic' or 'NONE', }, + CommentBold = { fg = fg_alt, 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 = light_bg and orange or blue }, + Repeat = { fg = light_bg and orange or blue }, + Keyword = { fg = light_bg and orange or blue }, + Operator = { fg = light_bg and orange or blue }, + Delimiter = { fg = light_bg and orange or blue }, + Statement = { fg = light_bg and orange or blue }, + Exception = { fg = light_bg and orange or blue }, + Conditional = { fg = light_bg and orange or blue }, + + Variable = { fg = '#8B93E6' }, + VariableBuiltin = { fg = '#8B93E6', gui = 'bold' }, + Constant = { fg = violet, gui = 'bold' }, + + Number = { fg = light_bg and yellow or orange }, + Float = { fg = light_bg and yellow or orange }, + Boolean = { fg = light_bg and yellow or orange, gui = 'bold' }, + Enum = { fg = light_bg and yellow or 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' }, + + Field = { fg = violet }, + Argument = { fg = light_magenta }, + Attribute = { fg = light_magenta }, + Identifier = { fg = light_magenta }, + Property = { fg = magenta }, + Function = { fg = magenta }, + FunctionBuiltin = { fg = light_magenta, gui = 'bold' }, + KeywordFunction = { fg = light_bg and orange or blue }, + Method = { fg = violet }, + + Type = { fg = yellow }, + TypeBuiltin = { fg = yellow, gui = 'bold' }, + StorageClass = { fg = light_bg and orange or blue }, + Class = { fg = light_bg and orange or blue }, + Structure = { fg = light_bg and orange or blue }, + Typedef = { fg = light_bg and orange or blue }, + + Regexp = { fg = '#dd0093' }, + RegexpSpecial = { fg = '#a40073' }, + RegexpDelimiter = { fg = '#540063', gui = 'bold' }, + RegexpKey = { fg = '#5f0041', gui = 'bold' }, } - apply_highlight(indent_blankline) -end + apply_highlight(main_syntax) + high_link('CommentURL', 'URL') + high_link('CommentLabel', 'CommentBold') + high_link('CommentSection', 'CommentBold') + high_link('Noise', 'Comment') --- }}} + -- }}} --- vim-illuminate {{{ + -- Diff {{{ -if configuration.plugins_integrations.vim_illuminate then - local illuminated = { - illuminatedWord = { - cterm = 'underline', - gui = 'underline', - }, - } + local diff = { + diffLine = { fg = base8, bg = diff_info_bg1 }, + diffSubName = { fg = base8, bg = diff_info_bg1 }, - apply_highlight(illuminated) -end + DiffAdd = { bg = diff_add_bg1 }, + DiffChange = { bg = diff_add_bg1 }, + DiffText = { bg = diff_add_bg0 }, + DiffDelete = { bg = gh_danger_bg0 }, --- }}} + DiffAdded = { fg = diff_add_fg0, bg = diff_add_bg1 }, + DiffModified = { fg = fg, bg = diff_info_bg0 }, + DiffRemoved = { fg = gh_danger_fg0, bg = gh_danger_bg1 }, --- LspSaga {{{ + DiffAddedGutter = { fg = diff_add_fg, gui = 'bold' }, + DiffModifiedGutter = { fg = diff_info_fg, gui = 'bold' }, + DiffRemovedGutter = { fg = gh_danger_fg, gui = 'bold' }, -if configuration.plugins_integrations.lspsaga then - local lspsaga = { - SagaShadow = { bg = bg }, - LspSagaDiagnosticHeader = { fg = red }, + DiffAddedGutterLineNr = { fg = grey }, + DiffModifiedGutterLineNr = { fg = grey }, + DiffRemovedGutterLineNr = { fg = grey }, } - 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('DiagnosticWarn', 'LspDiagnosticsDefaultWarning') - high_link('DiagnosticInfo', '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') -end - --- }}} - --- }}} - --- LSP {{{ - -local msg_underline = { - ErrorMsgUnderline = { fg = red, gui = 'underline' }, - WarningMsgUnderline = { fg = yellow, gui = 'underline' }, - MoreMsgUnderline = { fg = blue, gui = 'underline' }, - MsgUnderline = { fg = green, gui = 'underline' }, -} - -apply_highlight(msg_underline) -high_link('LspDiagnosticsFloatingError', 'ErrorMsg') -high_link('LspDiagnosticsFloatingWarning', 'WarningMsg') -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('DiagnosticFloatingError', 'ErrorMsg') -high_link('DiagnosticFloatingWarn', 'WarningMsg') -high_link('DiagnosticFloatingInfo', 'MoreMsg') -high_link('DiagnosticFloatingHint', 'Msg') -high_link('DiagnosticDefaultError', 'ErrorMsg') -high_link('DiagnosticDefaultWarn', 'WarningMsg') -high_link('DiagnosticDefaultInfo', 'MoreMsg') -high_link('DiagnosticDefaultHint', 'Msg') -high_link('DiagnosticVirtualTextError', 'ErrorMsg') -high_link('DiagnosticVirtualTextWarn', 'WarningMsg') -high_link('DiagnosticVirtualTextInfo', 'MoreMsg') -high_link('DiagnosticVirtualTextHint', 'Msg') -high_link('DiagnosticUnderlineError', 'ErrorMsgUnderline') -high_link('DiagnosticUnderlineWarn', 'WarningMsgUnderline') -high_link('DiagnosticUnderlineInfo', 'MoreMsgUnderline') -high_link('DiagnosticUnderlineHint', 'MsgUnderline') -high_link('DiagnosticSignError', 'ErrorMsg') -high_link('DiagnosticSignWarning', 'WarningMsg') -high_link('DiagnosticSignInformation', 'MoreMsg') -high_link('DiagnosticSignHint', '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') - --- }}} - --- TreeSitter {{{ - -if configuration.enable_treesitter then - -- We will set a special definition for TSStrike here - local treesitter = { - TSStrike = { fg = utils.Darken(violet, 0.2), cterm = 'strikethrough', gui = 'strikethrough' }, + high_clear('DiffAdd') + high_clear('DiffChange') + high_clear('DiffText') + high_clear('DiffDelete') + apply_highlight(diff) + + -- }}} + + -- Markdown {{{ + local markdown = { + markdownCode = { bg = bg_highlight }, + markdownCodeBlock = { bg = bg_highlight }, + markdownH1 = { gui = 'bold' }, + markdownH2 = { gui = 'bold' }, + markdownLinkText = { gui = 'underline' }, } - apply_highlight(treesitter) - high_link('TSException', 'Exception') - high_link('TSAnnotation', 'PreProc') - high_link('TSAttribute', 'Attribute') - high_link('TSConditional', 'Conditional') - high_link('TSComment', 'Comment') - high_link('TSConstructor', 'Structure') - high_link('TSConstant', 'Constant') - high_link('TSConstBuiltin', 'Constant') - high_link('TSConstMacro', 'Macro') - high_link('TSError', 'Error') - high_link('TSField', 'Field') - high_link('TSFloat', 'Float') - high_link('TSFunction', 'Function') - high_link('TSFuncBuiltin', 'FunctionBuiltin') - high_link('TSFuncMacro', 'Macro') - high_link('TSInclude', 'Include') - high_link('TSKeyword', 'Keyword') - high_link('TSKeywordFunction', 'KeywordFunction') - high_link('TSLabel', 'Label') - high_link('TSMethod', 'Method') - high_link('TSNamespace', 'Directory') - high_link('TSNumber', 'Number') - high_link('TSOperator', 'Operator') - high_link('TSParameter', 'Argument') - high_link('TSParameterReference', 'Argument') - high_link('TSProperty', 'Property') - high_link('TSPunctDelimiter', 'Delimiter') - high_link('TSPunctBracket', 'Delimiter') - high_link('TSPunctSpecial', 'Delimiter') - high_link('TSRepeat', 'Repeat') - high_link('TSString', 'String') - high_link('TSStringRegex', 'StringDelimiter') - high_link('TSStringEscape', 'StringDelimiter') - high_link('TSTag', 'Tag') - high_link('TSTagDelimiter', 'Delimiter') - high_link('TSStrong', 'Bold') - high_link('TSURI', 'URL') - high_link('TSWarning', 'WarningMsg') - high_link('TSDanger', 'ErrorMsg') - high_link('TSType', 'Type') - high_link('TSTypeBuiltin', 'TypeBuiltin') - high_link('TSVariable', 'None') - high_link('TSVariableBuiltin', 'VariableBuiltin') -end - --- }}} + apply_highlight(markdown) + --}}} + + -- Plugins {{{ + + -- barbar.nvim {{{ + + if configuration.plugins_integrations.barbar then + local barbar = { + 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(barbar) + end + + -- }}} + + -- BufferLine {{{ + + if configuration.plugins_integrations.bufferline and transparent_bg then + -- NOTE: this is a temporal workaround for using bufferline with a transparent + -- background and having highlighting, please refer to + -- https://github.com/NTBBloodbath/doom-one.nvim/issues/8#issuecomment-883737667 + -- for more information about this + local bufferline = { + BufferLineTab = { fg = fg, bg = bg }, + BufferLineTabClose = { fg = fg, bg = bg, gui = 'bold' }, + BufferLineTabSelected = { fg = blue, bg = bg, gui = 'bold,italic' }, + BufferLineBackground = { fg = fg_alt, bg = bg }, + BufferLineBufferSelected = { fg = fg, bg = bg, gui = 'bold,italic' }, + BufferLineBufferVisible = { fg = fg, bg = bg }, + BufferLineCloseButton = { fg = fg_alt, bg = bg }, + BufferLineCloseButtonSelected = { fg = fg, bg = bg, gui = 'bold' }, + BufferLineCloseButtonVisible = { fg = fg, bg = bg }, + BufferLineModified = { fg = green, bg = bg }, + BufferLineModifiedSelected = { fg = green, bg = bg }, + BufferLineModifiedVisible = { fg = green, bg = bg }, + BufferLineFill = { fg = blue, bg = bg_alt }, + BufferLineIndicatorSelected = { fg = blue, bg = bg }, + BufferLineSeparator = { fg = base0, bg = bg }, + BufferLineSeparatorSelected = { fg = base0, bg = bg }, + BufferLineSeparatorVisible = { fg = base0, bg = bg_alt }, + BufferLinePick = { fg = fg, bg = bg, gui = 'bold' }, + BufferLinePickSelected = { fg = blue, bg = bg, gui = 'bold,italic' }, + BufferLinePickVisible = { fg = fg, bg = bg_alt }, + + BufferLineDiagnostic = { fg = fg, bg = bg, sp = fg }, + BufferLineDiagnosticSelected = { fg = fg, bg = bg, sp = fg }, + BufferLineDiagnosticVisible = { fg = fg, bg = bg, sp = fg }, + + BufferLineInfo = { fg = cyan, bg = bg, sp = cyan, gui = 'bold' }, + BufferLineInfoSelected = { + fg = cyan, + bg = bg, + sp = cyan, + gui = 'bold,italic', + }, + BufferLineInfoVisible = { fg = cyan, bg = bg, sp = cyan, gui = 'bold' }, + BufferLineInfoDiagnostic = { fg = cyan, bg = bg, sp = cyan }, + BufferLineInfoDiagnosticSelected = { fg = cyan, bg = bg, sp = cyan }, + BufferLineInfoDiagnosticVisible = { fg = cyan, bg = bg, sp = cyan }, + BufferLineError = { fg = red, bg = bg, sp = red, gui = 'bold' }, + BufferLineErrorSelected = { + fg = red, + bg = bg, + sp = red, + gui = 'bold,italic', + }, + BufferLineErrorVisible = { fg = red, bg = bg, sp = red, gui = 'bold' }, + BufferLineErrorDiagnostic = { fg = red, bg = bg, sp = red }, + BufferLineErrorDiagnosticSelected = { fg = red, bg = bg, sp = red }, + BufferLineErrorDiagnosticVisible = { fg = red, bg = bg, sp = red }, + BufferLineWarning = { + fg = yellow, + bg = bg, + sp = yellow, + gui = 'bold,italic', + }, + BufferLineWarningSelected = { + fg = yellow, + bg = bg, + sp = yellow, + gui = 'bold,italic', + }, + BufferLineWarningVisible = { + fg = yellow, + bg = bg, + sp = yellow, + gui = 'bold', + }, + BufferLineWarningDiagnostic = { fg = yellow, bg = bg, sp = yellow }, + BufferLineWarningDiagnosticSelected = { fg = yellow, bg = bg, sp = yellow }, + BufferLineWarningDiagnosticVisible = { fg = yellow, bg = bg, sp = yellow }, + } + + apply_highlight(bufferline) + end + + -- }}} + + -- Gitgutter {{{ + + if configuration.plugins_integrations.gitgutter then + 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') + end + + -- }}} + + -- Gitsigns {{{ + + if configuration.plugins_integrations.gitsigns then + high_link('GitSignsAdd', 'DiffAddedGutter') + high_link('GitSignsChange', 'DiffModifiedGutter') + high_link('GitSignsDelete', 'DiffRemovedGutter') + high_link('GitSignsChangeDelete', 'DiffModifiedGutter') + end + + -- }}} + + -- Telescope {{{ + + if configuration.plugins_integrations.telescope then + local telescope = { + TelescopeSelection = { fg = yellow, gui = 'bold' }, + TelescopeSelectionCaret = { fg = light_bg and orange or blue }, + TelescopeMultiSelection = { fg = grey }, + TelescopeNormal = { fg = fg }, + TelescopeMatching = { fg = green, gui = 'bold' }, + TelescopePromptPrefix = { fg = light_bg and orange or blue }, + TelescopeBorder = { fg = light_bg and orange or blue }, + TelescopePromptBorder = { fg = light_bg and orange or blue }, + TelescopeResultsBorder = { fg = light_bg and orange or blue }, + TelescopePreviewBorder = { fg = light_bg and orange or blue }, + } + + apply_highlight(telescope) + high_link('TelescopePrompt', 'TelescopeNormal') + end + + -- }}} + + -- Neogit {{{ + + if configuration.plugins_integrations.neogit then + local neogit = { + NeogitDiffAdd = { fg = ng_add_fg, bg = ng_add_bg}, + NeogitDiffAddHighlight = { fg = ng_add_fg_hl, bg = ng_add_bg_hl, gui = 'bold' }, + NeogitDiffDelete = { fg = ng_delete_fg, bg = ng_delete_bg }, + NeogitDiffDeleteHighlight = { fg = ng_delete_fg_hl, bg = ng_delete_bg_hl, gui = 'bold' }, + NeogitDiffContext = { fg = fg_alt, bg = bg }, + NeogitDiffContextHighlight = { fg = fg, bg = bg_alt }, + NeogitHunkHeader = { fg = bg, bg = ng_header_bg }, + NeogitHunkHeaderHighlight = { fg = bg_alt, bg = ng_header_bg_hl, gui = 'bold' }, + NeogitStagedChanges = { fg = blue, gui = 'bold' }, + NeogitStagedChangesRegion = { bg = bg_highlight }, + NeogitStashes = { fg = blue, gui = 'bold' }, + NeogitUnstagedChanges = { fg = blue, gui = 'bold' }, + NeogitUntrackedfiles = { fg = blue, gui = 'bold' }, + } + + apply_highlight(neogit) + end + + -- }}} + + -- NvimTree {{{ + + if configuration.plugins_integrations.nvim_tree then + local nvim_tree = { + NvimTreeFolderName = { fg = light_bg and base9 or blue, gui = 'bold' }, + NvimTreeRootFolder = { fg = green }, + NvimTreeEmptyFolderName = { fg = fg_alt, gui = 'bold' }, + NvimTreeSymlink = { fg = fg, gui = 'underline' }, + NvimTreeExecFile = { fg = green, gui = 'bold' }, + NvimTreeImageFile = { fg = light_bg and orange or blue }, + NvimTreeOpenedFile = { fg = fg_alt }, + NvimTreeSpecialFile = { fg = fg, gui = 'underline' }, + NvimTreeMarkdownFile = { fg = fg, gui = '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') + end + + -- }}} + + -- Dashboard {{{ + + if configuration.plugins_integrations.dashboard then + local dashboard = { + dashboardHeader = { fg = '#586268' }, + dashboardCenter = { fg = light_bg and orange or blue }, + dashboardShortcut = { fg = '#9788b9' }, + } + + apply_highlight(dashboard) + high_link('dashboardFooter', 'dashboardHeader') + end + + -- }}} + + -- Startify {{{ + + if configuration.plugins_integrations.startify then + local startify = { + StartifyHeader = { fg = bg_popup }, + StartifyBracket = { fg = bg_popup }, + StartifyNumber = { fg = blue }, + StartifyPath = { fg = violet }, + StartifySlash = { fg = violet }, + StartifyFile = { fg = green }, + } + + apply_highlight(startify) + end + + -- }}} + + -- WhichKey {{{ + + if configuration.plugins_integrations.whichkey then + local whichkey = { + WhichKey = { fg = light_bg and orange or blue }, + WhichKeyGroup = { fg = magenta }, + WhichKeyDesc = { fg = magenta }, + WhichKeySeparator = { fg = base5 }, + WhichKeyFloat = { bg = base2 }, + WhichKeyValue = { fg = grey }, + } + + apply_highlight(whichkey) + end + + -- }}} + + -- indent-blankline {{{ + + if configuration.plugins_integrations.indent_blankline then + local indent_blankline = { + IndentBlanklineChar = { + fg = base4, + cterm = 'nocombine', + gui = 'nocombine', + }, + IndentBlanklineContextChar = { + fg = blue, + cterm = 'nocombine', + gui = 'nocombine', + }, + IndentBlanklineSpaceChar = { + fg = base4, + cterm = 'nocombine', + gui = 'nocombine', + }, + IndentBlanklineSpaceCharBlankline = { + fg = base4, + cterm = 'nocombine', + gui = 'nocombine', + }, + } + + apply_highlight(indent_blankline) + end + + -- }}} + + -- vim-illuminate {{{ + + if configuration.plugins_integrations.vim_illuminate then + local illuminated = { + illuminatedWord = { + cterm = 'underline', + gui = 'underline', + }, + } + + apply_highlight(illuminated) + end + + -- }}} + + -- LspSaga {{{ + + if configuration.plugins_integrations.lspsaga then + 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('DiagnosticWarn', 'LspDiagnosticsDefaultWarning') + high_link('DiagnosticInfo', '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') + end + + -- }}} + + -- }}} + + -- LSP {{{ + + local msg_underline = { + ErrorMsgUnderline = { fg = red, gui = 'underline' }, + WarningMsgUnderline = { fg = yellow, gui = 'underline' }, + MoreMsgUnderline = { fg = blue, gui = 'underline' }, + MsgUnderline = { fg = green, gui = 'underline' }, + } --- Neovim Terminal Colors {{{ - -if configuration.terminal_colors then - vim.g.terminal_color_0 = bg - vim.g.terminal_color_1 = red - vim.g.terminal_color_2 = green - vim.g.terminal_color_3 = yellow - vim.g.terminal_color_4 = blue - vim.g.terminal_color_5 = violet - vim.g.terminal_color_6 = cyan - vim.g.terminal_color_7 = fg - vim.g.terminal_color_8 = grey - vim.g.terminal_color_9 = red - vim.g.terminal_color_10 = green - vim.g.terminal_color_11 = orange - vim.g.terminal_color_12 = blue - vim.g.terminal_color_13 = violet - vim.g.terminal_color_14 = cyan - vim.g.terminal_color_15 = white - vim.g.terminal_color_background = bg_alt - vim.g.terminal_color_foreground = fg_alt + apply_highlight(msg_underline) + high_link('LspDiagnosticsFloatingError', 'ErrorMsg') + high_link('LspDiagnosticsFloatingWarning', 'WarningMsg') + 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('DiagnosticFloatingError', 'ErrorMsg') + high_link('DiagnosticFloatingWarn', 'WarningMsg') + high_link('DiagnosticFloatingInfo', 'MoreMsg') + high_link('DiagnosticFloatingHint', 'Msg') + high_link('DiagnosticDefaultError', 'ErrorMsg') + high_link('DiagnosticDefaultWarn', 'WarningMsg') + high_link('DiagnosticDefaultInfo', 'MoreMsg') + high_link('DiagnosticDefaultHint', 'Msg') + high_link('DiagnosticVirtualTextError', 'ErrorMsg') + high_link('DiagnosticVirtualTextWarn', 'WarningMsg') + high_link('DiagnosticVirtualTextInfo', 'MoreMsg') + high_link('DiagnosticVirtualTextHint', 'Msg') + high_link('DiagnosticUnderlineError', 'ErrorMsgUnderline') + high_link('DiagnosticUnderlineWarn', 'WarningMsgUnderline') + high_link('DiagnosticUnderlineInfo', 'MoreMsgUnderline') + high_link('DiagnosticUnderlineHint', 'MsgUnderline') + high_link('DiagnosticSignError', 'ErrorMsg') + high_link('DiagnosticSignWarning', 'WarningMsg') + high_link('DiagnosticSignInformation', 'MoreMsg') + high_link('DiagnosticSignHint', 'Msg') + high_link('LspReferenceText', 'LspHighlight') + high_link('LspReferenceRead', 'LspHighlight') + high_link('LspReferenceWrite', 'LspHighlight') + high_link('TermCursor', 'Cursor') + high_link('healthError', 'ErrorMsg') + high_link('healthSuccess', 'Msg') + high_link('healthWarning', 'WarningMsg') + + -- }}} + + -- TreeSitter {{{ + + if configuration.enable_treesitter then + -- We will set a special definition for TSStrike here + local treesitter = { + TSStrike = { fg = utils.Darken(violet, 0.2), cterm = 'strikethrough', gui = 'strikethrough' }, + } + + apply_highlight(treesitter) + high_link('TSException', 'Exception') + high_link('TSAnnotation', 'PreProc') + high_link('TSAttribute', 'Attribute') + high_link('TSConditional', 'Conditional') + high_link('TSComment', 'Comment') + high_link('TSConstructor', 'Structure') + high_link('TSConstant', 'Constant') + high_link('TSConstBuiltin', 'Constant') + high_link('TSConstMacro', 'Macro') + high_link('TSError', 'Error') + high_link('TSField', 'Field') + high_link('TSFloat', 'Float') + high_link('TSFunction', 'Function') + high_link('TSFuncBuiltin', 'FunctionBuiltin') + high_link('TSFuncMacro', 'Macro') + high_link('TSInclude', 'Include') + high_link('TSKeyword', 'Keyword') + high_link('TSKeywordFunction', 'KeywordFunction') + high_link('TSLabel', 'Label') + high_link('TSMethod', 'Method') + high_link('TSNamespace', 'Directory') + high_link('TSNumber', 'Number') + high_link('TSOperator', 'Operator') + high_link('TSParameter', 'Argument') + high_link('TSParameterReference', 'Argument') + high_link('TSProperty', 'Property') + high_link('TSPunctDelimiter', 'Delimiter') + high_link('TSPunctBracket', 'Delimiter') + high_link('TSPunctSpecial', 'Delimiter') + high_link('TSRepeat', 'Repeat') + high_link('TSString', 'String') + high_link('TSStringRegex', 'StringDelimiter') + high_link('TSStringEscape', 'StringDelimiter') + high_link('TSTag', 'Tag') + high_link('TSTagDelimiter', 'Delimiter') + high_link('TSStrong', 'Bold') + high_link('TSURI', 'URL') + high_link('TSWarning', 'WarningMsg') + high_link('TSDanger', 'ErrorMsg') + high_link('TSType', 'Type') + high_link('TSTypeBuiltin', 'TypeBuiltin') + high_link('TSVariable', 'None') + high_link('TSVariableBuiltin', 'VariableBuiltin') + end + + -- }}} + + -- Neovim Terminal Colors {{{ + + if configuration.terminal_colors then + vim.g.terminal_color_0 = bg + vim.g.terminal_color_1 = red + vim.g.terminal_color_2 = green + vim.g.terminal_color_3 = yellow + vim.g.terminal_color_4 = blue + vim.g.terminal_color_5 = violet + vim.g.terminal_color_6 = cyan + vim.g.terminal_color_7 = fg + vim.g.terminal_color_8 = grey + vim.g.terminal_color_9 = red + vim.g.terminal_color_10 = green + vim.g.terminal_color_11 = orange + vim.g.terminal_color_12 = blue + vim.g.terminal_color_13 = violet + vim.g.terminal_color_14 = cyan + vim.g.terminal_color_15 = white + vim.g.terminal_color_background = bg_alt + vim.g.terminal_color_foreground = fg_alt + end + + -- }}} end --- }}} - return doom_one