1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-16 03:14:55 +02:00

nvim/lua/user/plugins/core/colorscheme.lua: use custom_hightlights

This commit is contained in:
Henrik Hautakoski 2025-03-30 10:11:15 +02:00
parent aba8d805ad
commit e3e733f528

View file

@ -1,3 +1,4 @@
local options = { local options = {
flavour = "mocha", flavour = "mocha",
transparent_background = not vim.g.neovide, transparent_background = not vim.g.neovide,
@ -12,221 +13,220 @@ local options = {
overlay0 = "#3F4256", overlay0 = "#3F4256",
overlay1 = "#5B5F7C", overlay1 = "#5B5F7C",
overlay2 = "#767BA0", overlay2 = "#767BA0",
text = "#eceef4", text = "#eceef4",
}, },
}, },
no_italic = true, no_italic = true,
no_bold = true, no_bold = true,
highlight_overrides = { custom_highlights = function(colors)
mocha = function(colors) return {
return { CursorLine = { bg = colors.surface0 },
CursorLine = { bg = colors.surface0 }, SignColumnSep = { bg = colors.surface0, fg = colors.lavender },
SignColumnSep = { bg = colors.surface0, fg = colors.lavender },
Visual = { bg = colors.surface1 }, Visual = { bg = colors.surface1 },
FoldColumn = { fg = colors.surface2 }, FoldColumn = { fg = colors.surface2 },
-- Floating windows -- Floating windows
NormalFloat = { fg = colors.text, bg = colors.crust }, NormalFloat = { fg = colors.text, bg = colors.crust },
FloatTitle = { fg = colors.base, bg = colors.blue }, FloatTitle = { fg = colors.base, bg = colors.blue },
FloatBorder = { fg = colors.surface1, bg = colors.crust }, FloatBorder = { fg = colors.surface1, bg = colors.crust },
-- Window separator -- Window separator
WinSeparator = { fg = colors.surface0 }, WinSeparator = { fg = colors.surface0 },
-- Menus -- Menus
Pmenu = { link = "NormalFloat" }, Pmenu = { link = "NormalFloat" },
PmenuSel = { bg = colors.surface2 }, PmenuSel = { bg = colors.surface2 },
PmenuSbar = { link = "Pmenu" }, PmenuSbar = { link = "Pmenu" },
PmenuThumb = { link = "PmenuSel" }, PmenuThumb = { link = "PmenuSel" },
-- NoiceMini = { link = "NormalFloat" }, -- NoiceMini = { link = "NormalFloat" },
WhichKeyFloat = { link = "Pmenu" }, WhichKeyFloat = { link = "Pmenu" },
-- indent lines -- indent lines
IblScope = { fg = colors.surface0 }, IblScope = { fg = colors.surface0 },
-- Search matches -- Search matches
IncSearch = { bg = colors.yellow }, IncSearch = { bg = colors.yellow },
-- Autocomplete window -- Autocomplete window
CmpItemAbbr = { fg = colors.overlay2 }, CmpItemAbbr = { fg = colors.overlay2 },
CmpItemKindText = { fg = colors.text }, CmpItemKindText = { fg = colors.text },
-- CmpKind -- CmpKind
CmpItemKindBladeNav = { fg = "#f55247" }, CmpItemKindBladeNav = { fg = "#f55247" },
-- telescope -- telescope
TelescopeNormal = { link = "NormalFloat" }, TelescopeNormal = { link = "NormalFloat" },
TelescopeBorder = { link = "FloatBorder" }, TelescopeBorder = { link = "FloatBorder" },
TelescopeTitle = { link = "FloatTitle" }, TelescopeTitle = { link = "FloatTitle" },
TelescopePromptNormal = { bg = colors.mantle }, TelescopePromptNormal = { bg = colors.mantle },
TelescopePromptPrefix = { fg = colors.mauve }, TelescopePromptPrefix = { fg = colors.mauve },
TelescopePromptBorder = { fg = colors.mantle, bg = colors.mantle }, TelescopePromptBorder = { fg = colors.mantle, bg = colors.mantle },
TelescopePreviewTitle = { fg = colors.crust, bg = colors.mauve }, TelescopePreviewTitle = { fg = colors.crust, bg = colors.mauve },
TelescopeResultsNormal = { fg = colors.text, bg = colors.crust }, TelescopeResultsNormal = { fg = colors.text, bg = colors.crust },
TelescopeResultsClass = { link = "CmpItemKindClass" }, TelescopeResultsClass = { link = "CmpItemKindClass" },
TelescopeResultsInterface = { link = "CmpItemKindInterface" }, TelescopeResultsInterface = { link = "CmpItemKindInterface" },
TelescopeResultsField = { link = "CmpItemKindField" }, TelescopeResultsField = { link = "CmpItemKindField" },
TelescopeResultsFunction = { link = "CmpItemKindFunction" }, TelescopeResultsFunction = { link = "CmpItemKindFunction" },
TelescopeResultsMethod = { link = "CmpItemKindMethod" }, TelescopeResultsMethod = { link = "CmpItemKindMethod" },
TelescopeResultsNumber = { link = "CmpItemKindNumber" }, TelescopeResultsNumber = { link = "CmpItemKindNumber" },
TelescopeResultsStruct = { link = "CmpItemKindStruct" }, TelescopeResultsStruct = { link = "CmpItemKindStruct" },
TelescopeResultsConstant = { link = "CmpItemKindConstant" }, TelescopeResultsConstant = { link = "CmpItemKindConstant" },
TelescopeResultsOperator = { link = "CmpItemKindOperator" }, TelescopeResultsOperator = { link = "CmpItemKindOperator" },
TelescopeResultsVariable = { link = "CmpItemKindVariable" }, TelescopeResultsVariable = { link = "CmpItemKindVariable" },
TelescopeResultsIdentifier = { link = "CmpItemKindIdentifier" }, TelescopeResultsIdentifier = { link = "CmpItemKindIdentifier" },
TelescopeMatching = { fg = colors.lavender }, TelescopeMatching = { fg = colors.lavender },
TelescopeSelection = { fg = colors.text, bg = colors.surface1 }, TelescopeSelection = { fg = colors.text, bg = colors.surface1 },
TelescopeIndicatorModified = { fg = colors.yellow }, TelescopeIndicatorModified = { fg = colors.yellow },
TelescopeIndicatorReadonly = { fg = colors.red }, TelescopeIndicatorReadonly = { fg = colors.red },
TelescopeIndicatorHidden = { link = "TelescopeResultsComment" }, TelescopeIndicatorHidden = { link = "TelescopeResultsComment" },
-- Ufo -- Ufo
UfoFoldedEllipsis = { link = "Comment" }, UfoFoldedEllipsis = { link = "Comment" },
-- Statusline -- Statusline
StatusLine = { fg = colors.text, bg = colors.crust }, StatusLine = { fg = colors.text, bg = colors.crust },
StatusLineNormal = { link = "StatusLine" }, StatusLineNormal = { link = "StatusLine" },
StatusLineSeparator = { fg = colors.rosewater, bg = colors.crust }, StatusLineSeparator = { fg = colors.rosewater, bg = colors.crust },
StatusLineInsert = { fg = colors.base, bg = colors.blue }, StatusLineInsert = { fg = colors.base, bg = colors.blue },
StatusLineVisual = { fg = colors.base, bg = colors.mauve }, StatusLineVisual = { fg = colors.base, bg = colors.mauve },
StatusLineCommand = { fg = colors.base, bg = colors.yellow }, StatusLineCommand = { fg = colors.base, bg = colors.yellow },
StatusLineReplace = { fg = colors.base, bg = colors.maroon }, StatusLineReplace = { fg = colors.base, bg = colors.maroon },
-- Neotree -- Neotree
NeoTreeTabActive = { bg = colors.surface2, fg = colors.lavender }, NeoTreeTabActive = { bg = colors.surface2, fg = colors.lavender },
NeoTreeTabInactive = { bg = colors.crust, fg = colors.surface2 }, NeoTreeTabInactive = { bg = colors.crust, fg = colors.surface2 },
NeoTreeTabSeparatorActive = { fg = colors.base, bg = colors.surface2 }, NeoTreeTabSeparatorActive = { fg = colors.base, bg = colors.surface2 },
NeoTreeTabSeparatorInactive = { fg = colors.base, bg = colors.crust }, NeoTreeTabSeparatorInactive = { fg = colors.base, bg = colors.crust },
NeoTreeFileIcon = { link = "Normal" }, NeoTreeFileIcon = { link = "Normal" },
NeoTreeModified = { fg = colors.yellow }, NeoTreeModified = { fg = colors.yellow },
NeoTreeWinSeparator = { link = "WinSeparator" }, NeoTreeWinSeparator = { link = "WinSeparator" },
-- BlinkCmp -- BlinkCmp
BlinkCmpLabel = { link = 'CmpItemAbbr' }, BlinkCmpLabel = { link = 'CmpItemAbbr' },
BlinkCmpLabelMatch = { link = 'CmpItemAbbrMatch' }, BlinkCmpLabelMatch = { link = 'CmpItemAbbrMatch' },
BlinkCmpLabelDeprecated = { link = 'CmpItemAbbrDeprecated'}, BlinkCmpLabelDeprecated = { link = 'CmpItemAbbrDeprecated'},
BlinkCmpLabelDetail = { link = 'CmpItemMenu' }, BlinkCmpLabelDetail = { link = 'CmpItemMenu' },
BlinkCmpLabelDescription = { link = 'CmpItemMenu' }, BlinkCmpLabelDescription = { link = 'CmpItemMenu' },
BlinkCmpSource = { link = 'CmpItemMenu' }, BlinkCmpSource = { link = 'CmpItemMenu' },
BlinkCmpKind = { link = 'CmpItemKind' }, BlinkCmpKind = { link = 'CmpItemKind' },
BlinkCmpKindText = { link = "CmpItemKindText" }, BlinkCmpKindText = { link = "CmpItemKindText" },
BlinkCmpKindMethod = { link = "CmpItemKindMethod" }, BlinkCmpKindMethod = { link = "CmpItemKindMethod" },
BlinkCmpKindFunction = { link = "CmpItemKindFunction" }, BlinkCmpKindFunction = { link = "CmpItemKindFunction" },
BlinkCmpKindConstructor = { link = "CmpItemKindConstructor" }, BlinkCmpKindConstructor = { link = "CmpItemKindConstructor" },
BlinkCmpKindField = { link = "CmpItemKindField" }, BlinkCmpKindField = { link = "CmpItemKindField" },
BlinkCmpKindVariable = { link = "CmpItemKindVariable" }, BlinkCmpKindVariable = { link = "CmpItemKindVariable" },
BlinkCmpKindClass = { link = "CmpItemKindClass" }, BlinkCmpKindClass = { link = "CmpItemKindClass" },
BlinkCmpKindInterface = { link = "CmpItemKindInterface" }, BlinkCmpKindInterface = { link = "CmpItemKindInterface" },
BlinkCmpKindModule = { link = "CmpItemKindModule" }, BlinkCmpKindModule = { link = "CmpItemKindModule" },
BlinkCmpKindProperty = { link = "CmpItemKindProperty" }, BlinkCmpKindProperty = { link = "CmpItemKindProperty" },
BlinkCmpKindUnit = { link = "CmpItemKindUnit" }, BlinkCmpKindUnit = { link = "CmpItemKindUnit" },
BlinkCmpKindValue = { link = "CmpItemKindValue" }, BlinkCmpKindValue = { link = "CmpItemKindValue" },
BlinkCmpKindEnum = { link = "CmpItemKindEnum" }, BlinkCmpKindEnum = { link = "CmpItemKindEnum" },
BlinkCmpKindKeyword = { link = "CmpItemKindKeyword" }, BlinkCmpKindKeyword = { link = "CmpItemKindKeyword" },
BlinkCmpKindSnippet = { link = "CmpItemKindSnippet" }, BlinkCmpKindSnippet = { link = "CmpItemKindSnippet" },
BlinkCmpKindColor = { link = "CmpItemKindColor" }, BlinkCmpKindColor = { link = "CmpItemKindColor" },
BlinkCmpKindFile = { link = "CmpItemKindFile" }, BlinkCmpKindFile = { link = "CmpItemKindFile" },
BlinkCmpKindReference = { link = "CmpItemKindReference" }, BlinkCmpKindReference = { link = "CmpItemKindReference" },
BlinkCmpKindFolder = { link = "CmpItemKindFolder" }, BlinkCmpKindFolder = { link = "CmpItemKindFolder" },
BlinkCmpKindEnumMember = { link = "CmpItemKindEnumMember" }, BlinkCmpKindEnumMember = { link = "CmpItemKindEnumMember" },
BlinkCmpKindConstant = { link = "CmpItemKindConstant" }, BlinkCmpKindConstant = { link = "CmpItemKindConstant" },
BlinkCmpKindStruct = { link = "CmpItemKindStruct" }, BlinkCmpKindStruct = { link = "CmpItemKindStruct" },
BlinkCmpKindEvent = { link = "CmpItemKindEvent" }, BlinkCmpKindEvent = { link = "CmpItemKindEvent" },
BlinkCmpKindOperator = { link = "CmpItemKindOperator" }, BlinkCmpKindOperator = { link = "CmpItemKindOperator" },
BlinkCmpKindTypeParameter = { link = "CmpItemKindTypeParameter" }, BlinkCmpKindTypeParameter = { link = "CmpItemKindTypeParameter" },
-- Neotest -- Neotest
NeoTestWinSelect = { fg = colors.mauve }, NeoTestWinSelect = { fg = colors.mauve },
NeoTestIndent = { fg = colors.surface1 }, NeoTestIndent = { fg = colors.surface1 },
NeoTestExpandMarker = { link = "NeoTestIndent" }, NeoTestExpandMarker = { link = "NeoTestIndent" },
NeoTestAdapterName = { fg = colors.mauve }, NeoTestAdapterName = { fg = colors.mauve },
NeoTestFile = { fg = colors.lavender }, NeoTestFile = { fg = colors.lavender },
NeoTestDir = { fg = colors.blue }, NeoTestDir = { fg = colors.blue },
NeoTestTarget = { fg = colors.blue }, NeoTestTarget = { fg = colors.blue },
NeoTestNamespace = { fg = colors.mauve }, NeoTestNamespace = { fg = colors.mauve },
NeoTestPassed = { fg = colors.green }, NeoTestPassed = { fg = colors.green },
NeoTestFailed = { fg = colors.red }, NeoTestFailed = { fg = colors.red },
NeoTestSkipped = { fg = colors.blue }, NeoTestSkipped = { fg = colors.blue },
NeoTestRunning = { fg = colors.yellow }, NeoTestRunning = { fg = colors.yellow },
NeoTestWatching = { fg = colors.yellow }, NeoTestWatching = { fg = colors.yellow },
NeoTestMarked = { fg = colors.orange }, NeoTestMarked = { fg = colors.orange },
-- Diagnostics -- Diagnostics
DiagnosticUnderlineInfo = { style = {"undercurl"} }, DiagnosticUnderlineInfo = { style = {"undercurl"} },
DiagnosticUnderlineHint = { style = {"undercurl"} }, DiagnosticUnderlineHint = { style = {"undercurl"} },
DiagnosticUnderlineWarn = { style = {"undercurl"} }, DiagnosticUnderlineWarn = { style = {"undercurl"} },
DiagnosticUnderlineError = { style = {"undercurl"} }, DiagnosticUnderlineError = { style = {"undercurl"} },
-- Markdown rendering -- Markdown rendering
RenderMarkdownCode = { bg = colors.crust }, RenderMarkdownCode = { bg = colors.crust },
RenderMarkdownCodeInline = { fg = colors.rosewater, bg = colors.crust }, RenderMarkdownCodeInline = { fg = colors.rosewater, bg = colors.crust },
-- Syntax -- Syntax
PreProc = { fg = colors.mauve }, PreProc = { fg = colors.mauve },
Operator = { fg = colors.flamingo }, Operator = { fg = colors.flamingo },
Function = { link = "@text" }, Function = { link = "@text" },
Delimiter = { link = "Operator" }, Delimiter = { link = "Operator" },
Keyword = { fg = colors.yellow }, Keyword = { fg = colors.yellow },
Include = { link = "Keyword" }, Include = { link = "Keyword" },
Repeat = { link = "Keyword" }, Repeat = { link = "Keyword" },
Conditional = { link = "Keyword" }, Conditional = { link = "Keyword" },
Type = { fg = colors.blue }, Type = { fg = colors.blue },
Label = { link = "String" }, Label = { link = "String" },
String = { fg = colors.lavender }, String = { fg = colors.lavender },
Exception = { link = "Keyword" }, Exception = { link = "Keyword" },
-- Treesitter tokens -- Treesitter tokens
["@constructor"] = { link = "Function" }, ["@constructor"] = { link = "Function" },
["@variable"] = { fg = colors.green }, ["@variable"] = { fg = colors.green },
["@variable.builtin"] = { link = "@variable" }, ["@variable.builtin"] = { link = "@variable" },
["@variable.parameter"] = { link = "@parameter" }, ["@variable.parameter"] = { link = "@parameter" },
["@variable.member"] = { link = "@variable" }, ["@variable.member"] = { link = "@variable" },
["@parameter"] = { link = "@variable" }, ["@parameter"] = { link = "@variable" },
["@keyword.function"] = { link = "Keyword" }, ["@keyword.function"] = { link = "Keyword" },
["@keyword.return"] = { link = "Keyword" }, ["@keyword.return"] = { link = "Keyword" },
["@keyword.operator"] = { link = "Keyword" }, ["@keyword.operator"] = { link = "Keyword" },
["@property"] = { link = "@variable" }, ["@property"] = { link = "@variable" },
["@tag"] = { link = "Keyword" }, ["@tag"] = { link = "Keyword" },
["@tag.delimiter"] = { link = "@text" }, ["@tag.delimiter"] = { link = "@text" },
["@module"] = { link = "@text" }, ["@module"] = { link = "@text" },
["@namespace"] = { link = "@keyword" }, ["@namespace"] = { link = "@keyword" },
["@punctuation.bracket"] = { link = "@punctuation" }, ["@punctuation.bracket"] = { link = "@punctuation" },
-- LSP -- LSP
["@lsp.type.property"] = { link = "@variable" }, ["@lsp.type.property"] = { link = "@variable" },
["@lsp.type.namespace.go"] = { fg = colors.rosewater }, ["@lsp.type.namespace.go"] = { fg = colors.rosewater },
-- Bash -- Bash
["@variable.parameter.bash"] = { fg = colors.rosewater }, ["@variable.parameter.bash"] = { fg = colors.rosewater },
-- Makefile -- Makefile
["@function.make"] = { link = "Keyword" }, ["@function.make"] = { link = "Keyword" },
["@string.special.symbol.make"] = { link = "@variable" }, ["@string.special.symbol.make"] = { link = "@variable" },
-- Markup -- Markup
["@markup.raw"] = { link = "@text" }, ["@markup.raw"] = { link = "@text" },
["@markup.strong"] = { fg = colors.blue }, ["@markup.strong"] = { fg = colors.blue },
["@markup.italic"] = { fg = colors.green }, ["@markup.italic"] = { fg = colors.green },
-- PHP -- PHP
["@keyword.import.php"] = { link = "@keyword" }, ["@keyword.import.php"] = { link = "@keyword" },
["@function.builtin.php"] = { fg = colors.blue }, ["@function.builtin.php"] = { fg = colors.blue },
["@class.name.php"] = { link = "@text" }, ["@class.name.php"] = { link = "@text" },
["@class.inherit.name.php"] = { link = "@text" }, ["@class.inherit.name.php"] = { link = "@text" },
["@class.implements.name.php"] = { link = "@text" }, ["@class.implements.name.php"] = { link = "@text" },
["@interface.name.php"] = { link = "@text" }, ["@interface.name.php"] = { link = "@text" },
["@namespace.name.php"] = { link = "@text" }, ["@namespace.name.php"] = { link = "@text" },
["@namespace.alias.name.php"] = { link = "@text" }, ["@namespace.alias.name.php"] = { link = "@text" },
["@use.trait.name.php"] = { link = "@text" }, ["@use.trait.name.php"] = { link = "@text" },
-- Blade -- Blade
["@tag.blade"] = { fg = colors.mauve }, ["@tag.blade"] = { fg = colors.mauve },
} }
end, end,
},
integrations = { integrations = {
cmp = true, cmp = true,
treesitter = true, treesitter = true,
@ -239,7 +239,6 @@ local options = {
} }
} }
return { return {
"catppuccin/nvim", "catppuccin/nvim",
name = "catppuccin", name = "catppuccin",