nvim/lua/colors/quasimono.lua
2025-11-05 19:29:55 +01:00

116 lines
2.8 KiB
Lua

local custom_highlights = function(C)
local U = require("catppuccin.utils.colors")
local ret = {
-- fuuctions sigature & calls are blue
Function = { fg = C.blue, style = { "bold" } },
["@function.call"] = { fg = U.darken(C.blue, 0.5, C.text) },
["@lsp.type.function"] = { link = "@function.call" },
["@lsp.type.method"] = { link = "@function.call" },
-- Types are green
-- Type = { fg = U.darken(C.green, 0.8, C.black) },
-- ["@type.python"] = { link = "Type", },
-- Comments should be important
Comment = { fg = C.mauve, style = {}};
-- differentiate between consts and mutables
variable = {},
["@lsp.mod.readonly"] = { fg = C.text },
["@variable"] = { fg = U.darken(C.red, .5, C.text) },
-- highly visible consts kwds
["@keyword.modifier"] = { fg = C.yellow, style = {"italic"}},
-- Plugin specific
HopNextKey = { bg = C.text, fg = C.base, style = { "bold" } },
HopNextKey1 = { link = "HopNextKey" },
HopNextKey2 = { link = "HopNextKey" },
}
-- base color
for _, field in ipairs({
"Constant",
"String",
"Character",
"Number",
"Float",
"Boolean",
"Identifier",
"Statement",
"Conditional",
"Repeat",
"Label",
"Operator",
"Keyword",
"Exception",
"StorageClass",
"Structure",
"Special",
"Typedef",
"SpecialChar",
"Tag",
"Delimiter",
"Debug",
}) do
ret[field] = { fg = C.text };
end
-- pink
for _, field in ipairs({
"PreProc",
"Include",
"Define",
"Macro",
"@lsp.type.macro",
"PreCondit",
"@Keyword.directive",
}) do
ret[field] = { fg = C.pink };
end
for _, field in ipairs({
"DiagnosticUnderlineError",
"DiagnosticUnderlineWarn",
"DiagnosticUnderlineInfo",
"DiagnosticUnderlineHint",
"DiagnosticUnderlineOk",
}) do
ret[field] = { style = { "undercurl" } };
end
-- for semantic coloring from ccls
local var_colors = {
U.darken(C.green, .4, C.text);
U.darken(C.lavender, .5, C.text);
U.darken(C.peach, .5, C.text);
U.darken(C.yellow, .6, C.text);
U.darken(C.green, .7, C.text);
U.darken(C.mauve, .8, C.text);
U.darken(C.teal, .3, C.text);
U.darken(C.teal, .5, C.text);
U.darken(C.teal, .7, C.text);
U.darken(C.red, .3, C.text);
U.darken(C.red, .5, C.text);
U.darken(C.red, .7, C.text);
}
local all_colors = {
variable = var_colors
}
for type, colors in pairs(all_colors) do
for i = 1, #colors do
for _, lang in pairs({ 'cpp' }) do
local k = string.format('@lsp.typemod.%s.id%s.%s', type, i - 1, lang)
ret[k] = { fg = colors[i] }
end
end
end
return ret
end
return custom_highlights