From 2ba73eb10e53b91e313be3ba89fb7a9ea335b786 Mon Sep 17 00:00:00 2001 From: Martin Larsson Date: Sat, 25 May 2024 14:48:08 +0200 Subject: [PATCH] We no longer dim inactive windows, add new highlight group which is intended to use for utility panels such as oil, trouble, lspsaga, mason, lazy, general floating windows, maybe even term window? Basically, just not the code window --- home/.config/nvim/lua/plugs/catppuccin.lua | 28 ++++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/home/.config/nvim/lua/plugs/catppuccin.lua b/home/.config/nvim/lua/plugs/catppuccin.lua index 3e9b83d..6a82a0b 100644 --- a/home/.config/nvim/lua/plugs/catppuccin.lua +++ b/home/.config/nvim/lua/plugs/catppuccin.lua @@ -1,8 +1,21 @@ +local function add_new_custom_highlights() + local colors = require("catppuccin.palettes.macchiato"); + local highlights = { + { name = "Utility", config = { bg = colors.mantle, fg = colors.text } }, + } + + for _, highlight in ipairs(highlights) do + vim.api.nvim_set_hl(0, highlight.name, highlight.config) + end +end + return { "catppuccin/nvim", name = "catppuccin", priority = 1000, config = function() + add_new_custom_highlights() + require("catppuccin").setup({ flavour = "macchiato", background = { @@ -19,15 +32,15 @@ return { mason = true, semantic_tokens = true, treesitter_context = true, - telescope = { - enable = true, - }, + -- telescope = { -- This doesn't seem to be compatible when running the custom dropdown theme + -- enable = true + -- }, cmp = true, dap_ui = true, dap = true, }, dim_inactive = { - enabled = true, + enabled = false, shade = "dark", percent = 0.15, }, @@ -36,11 +49,12 @@ return { }, custom_highlights = function(colors) return { - FloatBorder = { fg = colors.lavender }, + FloatBorder = { fg = colors.surface0 }, CmpItemMenu = { fg = colors.overlay2 }, - TelescopeNormal = { link = "NormalFloat" }, - TelescopeSelection = { link = "NormalFloat" }, CopilotSuggestion = { fg = colors.overlay2 }, + + Pmenu = { link = "Utility" }, + PmenuSel = { bg = colors.overlay0 }, } end })