fix: titles are no longer dynamically coloured

Closes #219
This commit is contained in:
mvllow 2024-01-26 14:12:01 -06:00
commit 2e5a448875
No known key found for this signature in database

View file

@ -20,9 +20,6 @@ local function set_highlights()
} }
end end
local adaptive_title = { fg = styles.bold and palette.text or palette.foam, bold = styles.bold }
local adaptive_border = make_border()
local highlights = {} local highlights = {}
local legacy_highlights = { local legacy_highlights = {
["@attribute.diff"] = { fg = palette.gold }, ["@attribute.diff"] = { fg = palette.gold },
@ -98,10 +95,10 @@ local function set_highlights()
diffAdded = { link = "DiffAdd" }, diffAdded = { link = "DiffAdd" },
diffChanged = { link = "DiffChange" }, diffChanged = { link = "DiffChange" },
diffRemoved = { link = "DiffDelete" }, diffRemoved = { link = "DiffDelete" },
Directory = adaptive_title, Directory = { fg = palette.foam, bold = styles.bold },
-- EndOfBuffer = {}, -- EndOfBuffer = {},
ErrorMsg = { fg = groups.error, bold = styles.bold }, ErrorMsg = { fg = groups.error, bold = styles.bold },
FloatBorder = adaptive_border, FloatBorder = make_border(),
FloatTitle = { link = "Directory" }, FloatTitle = { link = "Directory" },
FoldColumn = { fg = palette.muted }, FoldColumn = { fg = palette.muted },
Folded = { fg = palette.text, bg = groups.panel }, Folded = { fg = palette.text, bg = groups.panel },
@ -144,7 +141,7 @@ local function set_highlights()
TabLine = { fg = palette.subtle, bg = groups.panel }, TabLine = { fg = palette.subtle, bg = groups.panel },
TabLineFill = { bg = groups.panel }, TabLineFill = { bg = groups.panel },
TabLineSel = { fg = palette.text, bg = palette.overlay, bold = styles.bold }, TabLineSel = { fg = palette.text, bg = palette.overlay, bold = styles.bold },
Title = adaptive_title, Title = { fg = palette.foam, bold = styles.bold },
VertSplit = { fg = groups.border }, VertSplit = { fg = groups.border },
Visual = { bg = palette.highlight_med }, Visual = { bg = palette.highlight_med },
-- VisualNOS = {}, -- VisualNOS = {},
@ -357,7 +354,7 @@ local function set_highlights()
["@markup.strikethrough"] = { strikethrough = true }, ["@markup.strikethrough"] = { strikethrough = true },
["@markup.underline"] = { underline = true }, ["@markup.underline"] = { underline = true },
["@markup.heading"] = adaptive_title, ["@markup.heading"] = { fg = palette.foam, bold = styles.bold },
["@markup.quote"] = { fg = palette.subtle }, ["@markup.quote"] = { fg = palette.subtle },
["@markup.math"] = { link = "Special" }, ["@markup.math"] = { link = "Special" },
@ -459,7 +456,7 @@ local function set_highlights()
NvimTreeNormal = { link = "Normal" }, NvimTreeNormal = { link = "Normal" },
NvimTreeOpenedFile = { fg = palette.text, bg = palette.overlay }, NvimTreeOpenedFile = { fg = palette.text, bg = palette.overlay },
NvimTreeOpenedFolderName = { link = "NvimTreeFolderName" }, NvimTreeOpenedFolderName = { link = "NvimTreeFolderName" },
NvimTreeRootFolder = adaptive_title, NvimTreeRootFolder = { fg = palette.foam, bold = styles.bold },
NvimTreeSpecialFile = { link = "NvimTreeNormal" }, NvimTreeSpecialFile = { link = "NvimTreeNormal" },
NvimTreeWindowPicker = { link = "StatusLineTerm" }, NvimTreeWindowPicker = { link = "StatusLineTerm" },
@ -545,22 +542,22 @@ local function set_highlights()
NeorgHeading5Title = { link = "markdownH5" }, NeorgHeading5Title = { link = "markdownH5" },
NeorgHeading6Prefix = { link = "markdownH6Delimiter" }, NeorgHeading6Prefix = { link = "markdownH6Delimiter" },
NeorgHeading6Title = { link = "markdownH6" }, NeorgHeading6Title = { link = "markdownH6" },
NeorgMarkerTitle = adaptive_title, NeorgMarkerTitle = { fg = palette.foam, bold = styles.bold },
-- tami5/lspsaga.nvim (fork of glepnir/lspsaga.nvim) -- tami5/lspsaga.nvim (fork of glepnir/lspsaga.nvim)
DefinitionCount = { fg = palette.rose }, DefinitionCount = { fg = palette.rose },
DefinitionIcon = { fg = palette.rose }, DefinitionIcon = { fg = palette.rose },
DefintionPreviewTitle = { fg = palette.rose, bold = styles.bold }, DefintionPreviewTitle = { fg = palette.rose, bold = styles.bold },
LspFloatWinBorder = adaptive_border, LspFloatWinBorder = make_border(),
LspFloatWinNormal = { bg = groups.panel }, LspFloatWinNormal = { bg = groups.panel },
LspSagaAutoPreview = { fg = palette.subtle }, LspSagaAutoPreview = { fg = palette.subtle },
LspSagaCodeActionBorder = make_border(palette.rose), LspSagaCodeActionBorder = make_border(palette.rose),
LspSagaCodeActionContent = { fg = palette.foam }, LspSagaCodeActionContent = { fg = palette.foam },
LspSagaCodeActionTitle = { fg = palette.gold, bold = styles.bold }, LspSagaCodeActionTitle = { fg = palette.gold, bold = styles.bold },
LspSagaCodeActionTruncateLine = { link = "LspSagaCodeActionBorder" }, LspSagaCodeActionTruncateLine = { link = "LspSagaCodeActionBorder" },
LspSagaDefPreviewBorder = adaptive_border, LspSagaDefPreviewBorder = make_border(),
LspSagaDiagnosticBorder = make_border(palette.gold), LspSagaDiagnosticBorder = make_border(palette.gold),
LspSagaDiagnosticHeader = adaptive_title, LspSagaDiagnosticHeader = { fg = palette.foam, bold = styles.bold },
LspSagaDiagnosticTruncateLine = { link = "LspSagaDiagnosticBorder" }, LspSagaDiagnosticTruncateLine = { link = "LspSagaDiagnosticBorder" },
LspSagaDocTruncateLine = { link = "LspSagaHoverBorder" }, LspSagaDocTruncateLine = { link = "LspSagaHoverBorder" },
LspSagaFinderSelection = { fg = palette.gold }, LspSagaFinderSelection = { fg = palette.gold },
@ -597,26 +594,26 @@ local function set_highlights()
HopUnmatched = { fg = palette.muted }, HopUnmatched = { fg = palette.muted },
-- nvim-telescope/telescope.nvim -- nvim-telescope/telescope.nvim
TelescopeBorder = adaptive_border, TelescopeBorder = make_border(),
TelescopeMatching = { fg = palette.rose }, TelescopeMatching = { fg = palette.rose },
TelescopeNormal = { link = "NormalFloat" }, TelescopeNormal = { link = "NormalFloat" },
TelescopePromptNormal = { link = "TelescopeNormal" }, TelescopePromptNormal = { link = "TelescopeNormal" },
TelescopePromptPrefix = { fg = palette.subtle }, TelescopePromptPrefix = { fg = palette.subtle },
TelescopeSelection = { fg = palette.text, bg = palette.overlay }, TelescopeSelection = { fg = palette.text, bg = palette.overlay },
TelescopeSelectionCaret = { fg = palette.rose, bg = palette.overlay }, TelescopeSelectionCaret = { fg = palette.rose, bg = palette.overlay },
TelescopeTitle = adaptive_title, TelescopeTitle = { fg = palette.foam, bold = styles.bold },
-- ibhagwan/fzf-lua -- ibhagwan/fzf-lua
FzfLuaNormal = { link = "NormalFloat" }, FzfLuaNormal = { link = "NormalFloat" },
FwzfLuaTitle = adaptive_title, FwzfLuaTitle = { fg = palette.foam, bold = styles.bold },
FzfLuaBorder = adaptive_border, FzfLuaBorder = make_border(),
FzfLuaHeaderText = { fg = palette.love }, FzfLuaHeaderText = { fg = palette.love },
FzfLuaHeaderBind = { fg = palette.rose }, FzfLuaHeaderBind = { fg = palette.rose },
FzfLuaBufFlagCur = { fg = palette.subtle }, FzfLuaBufFlagCur = { fg = palette.subtle },
FzfLuaBufFlagAlt = { fg = palette.subtle }, FzfLuaBufFlagAlt = { fg = palette.subtle },
-- rcarriga/nvim-notify -- rcarriga/nvim-notify
NotifyDEBUGBorder = adaptive_border, NotifyDEBUGBorder = make_border(),
NotifyDEBUGIcon = { link = "NotifyDEBUGTitle" }, NotifyDEBUGIcon = { link = "NotifyDEBUGTitle" },
NotifyDEBUGTitle = { fg = palette.muted }, NotifyDEBUGTitle = { fg = palette.muted },
NotifyERRORBorder = make_border(groups.error), NotifyERRORBorder = make_border(groups.error),
@ -639,7 +636,7 @@ local function set_highlights()
DapUIBreakpointsLine = { link = "DapUIBreakpointsPath" }, DapUIBreakpointsLine = { link = "DapUIBreakpointsPath" },
DapUIBreakpointsPath = { fg = palette.foam }, DapUIBreakpointsPath = { fg = palette.foam },
DapUIDecoration = { link = "DapUIBreakpointsPath" }, DapUIDecoration = { link = "DapUIBreakpointsPath" },
DapUIFloatBorder = adaptive_border, DapUIFloatBorder = make_border(),
DapUIFrameName = { fg = palette.text }, DapUIFrameName = { fg = palette.text },
DapUILineNumber = { link = "DapUIBreakpointsPath" }, DapUILineNumber = { link = "DapUIBreakpointsPath" },
DapUIModifiedValue = { fg = palette.foam, bold = styles.bold }, DapUIModifiedValue = { fg = palette.foam, bold = styles.bold },