feat(nvim): add some custom highlights to the catppuccin theme

This commit is contained in:
Sergio Laín 2025-08-04 00:08:38 +02:00
parent e2bd23b90e
commit 238d9372c6
No known key found for this signature in database
GPG key ID: 51BB28D8B42FB438

View file

@ -1,4 +1,6 @@
local palette = require("catppuccin.palettes").get_palette("macchiato") -- Import your favorite catppuccin colors local palette = require("catppuccin.palettes").get_palette("macchiato")
local darken = require("catppuccin.utils.colors").darken
local transparent_bg = require("catppuccin").options.transparent_background and "NONE" or palette.mantle
return { return {
{ {
@ -6,6 +8,22 @@ return {
lazy = false, lazy = false,
name = "catppuccin", name = "catppuccin",
opts = { opts = {
custom_highlights = {
-- Blink Menu
Pmenu = { bg = darken(palette.surface0, 0.8, palette.crust) },
PmenuSel = { bg = palette.surface1, style = { "bold" } },
PmenuBar = { bg = palette.surface1 },
BlinkCmpMenuBorder = { bg = darken(palette.surface0, 0.8, palette.crust) },
-- Snacks
SnacksNotifierInfo = { fg = palette.lavender },
SnacksNotifierIconInfo = { fg = palette.lavender },
SnacksNotifierTitleInfo = { fg = palette.lavender, style = { "italic" } },
SnacksNotifierFooterInfo = { link = "DiagnosticInfo" },
SnacksNotifierBorderInfo = { fg = palette.lavender },
SnacksPickerPreviewTitle = { fg = palette.crust, bg = palette.lavender },
SnacksDashboardHeader = { fg = palette.lavender },
},
styles = { styles = {
comments = { "italic" }, comments = { "italic" },
}, },
@ -16,6 +34,12 @@ return {
transparent_background = true, transparent_background = true,
term_colors = true, term_colors = true,
auto_integrations = true, auto_integrations = true,
integrations = {
snacks = {
enabled = true,
indent_scope_color = "lavender",
},
},
float = { float = {
transparent = true, -- enables transparency on floating windows transparent = true, -- enables transparency on floating windows
solid = true, -- use nvchad styling for floating windows solid = true, -- use nvchad styling for floating windows
@ -75,4 +99,49 @@ return {
}, },
}, },
}, },
{
"nvim-lualine/lualine.nvim",
opts = {
options = {
theme = {
normal = {
a = { bg = palette.lavender, fg = palette.mantle, gui = "bold" },
b = { bg = palette.surface0, fg = palette.lavender },
c = { bg = transparent_bg, fg = palette.text },
},
insert = {
a = { bg = palette.green, fg = palette.base, gui = "bold" },
b = { bg = palette.surface0, fg = palette.green },
},
terminal = {
a = { bg = palette.green, fg = palette.base, gui = "bold" },
b = { bg = palette.surface0, fg = palette.green },
},
command = {
a = { bg = palette.peach, fg = palette.base, gui = "bold" },
b = { bg = palette.surface0, fg = palette.peach },
},
visual = {
a = { bg = palette.mauve, fg = palette.base, gui = "bold" },
b = { bg = palette.surface0, fg = palette.mauve },
},
replace = {
a = { bg = palette.red, fg = palette.base, gui = "bold" },
b = { bg = palette.surface0, fg = palette.red },
},
inactive = {
a = { bg = transparent_bg, fg = palette.lavender },
b = { bg = transparent_bg, fg = palette.surface1, gui = "bold" },
c = { bg = transparent_bg, fg = palette.overlay0 },
},
},
},
},
},
} }