From 7b9e749477e270a73d46094da95bb8780386e7ce Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Tue, 16 Apr 2024 03:53:39 +0200 Subject: [PATCH] Improved how customized highlight groups work --- nvim/dot-config/nvim/lua/plugins/cmp.lua | 2 +- nvim/dot-config/nvim/lua/themes/gruvbox.lua | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/nvim/dot-config/nvim/lua/plugins/cmp.lua b/nvim/dot-config/nvim/lua/plugins/cmp.lua index 788c2fd..b68df8c 100644 --- a/nvim/dot-config/nvim/lua/plugins/cmp.lua +++ b/nvim/dot-config/nvim/lua/plugins/cmp.lua @@ -26,7 +26,7 @@ return { end, }, window = { - completion = cmp.config.window.bordered({ border = border, winhighlight = "CursorLine:YankHighlight" }), + completion = cmp.config.window.bordered({ border = border, winhighlight = "CursorLine:CmpSelection" }), documentation = cmp.config.window.bordered({ border = border }), }, -- Include the source of the cmp entry diff --git a/nvim/dot-config/nvim/lua/themes/gruvbox.lua b/nvim/dot-config/nvim/lua/themes/gruvbox.lua index aca867e..f4668cb 100644 --- a/nvim/dot-config/nvim/lua/themes/gruvbox.lua +++ b/nvim/dot-config/nvim/lua/themes/gruvbox.lua @@ -14,24 +14,25 @@ return { }, overrides = { YankHighlight = { fg = colors.blue, bg = colors.bg0, reverse = config.inverse }, - IncSearch = { fg = colors.aqua }, Search = { fg = colors.aqua }, + IncSearch = { link = "Search" }, NormalFloat = { bg = colors.bg0 }, FloatBorder = { fg = colors.bg4 }, TelescopePromptTitle = { fg = colors.fg4 }, - TelescopePromptBorder = { fg = colors.bg4 }, + TelescopePromptBorder = { link = "FloatBorder" }, TelescopePromptPrefix = { fg = colors.red }, - TelescopePreviewTitle = { fg = colors.fg4 }, - TelescopePreviewBorder = { fg = colors.bg4 }, - TelescopeResultsTitle = { fg = colors.fg4 }, - TelescopeResultsBorder = { fg = colors.bg4 }, + TelescopePreviewTitle = { link = "TelescopePreviewTitle" }, + TelescopePreviewBorder = { link = "FloatBorder" }, + TelescopeResultsTitle = { link = "TelescopePreviewTitle" }, + TelescopeResultsBorder = { link = "FloatBorder" }, TelescopeMatching = { fg = colors.aqua, bold = true }, TelescopeSelection = { fg = colors.blue }, - TelescopeSelectionCaret = { fg = colors.red }, + TelescopeSelectionCaret = { link = "TelescopeSelection" }, CmpItemAbbrMatch = { fg = colors.aqua, bold = true }, - CmpItemAbbrMatchFuzzy = { fg = colors.aqua, bold = true }, + CmpItemAbbrMatchFuzzy = { link = "CmpItemAbbrMatch" }, CmpItemMenu = { fg = colors.bg2 }, CmpItemKindFunction = { fg = colors.red }, + CmpSelection = { fg = colors.bg0, bg = colors.blue }, LspReferenceText = { fg = colors.bg0, bg = colors.neutral_purple }, LspReferenceRead = { link = "LspReferenceText" }, LspReferenceWrite = { link = "LspReferenceText" },