matugen/templates/nvim.lua

116 lines
4.1 KiB
Lua
Raw Normal View History

2026-01-20 12:33:06 +01:00
-- Matugen Theme
vim.cmd("hi clear")
if vim.fn.exists("syntax_on") then
vim.cmd("syntax reset")
end
vim.g.colors_name = "matugen"
local c = {
2026-01-21 23:03:48 +01:00
bg = "{{colors.background.default.hex}}",
2026-01-20 12:33:06 +01:00
fg = "{{colors.on_background.default.hex}}",
cursor = "{{colors.primary.default.hex}}",
c0 = "{{colors.surface.default.hex}}",
c1 = "{{colors.error.default.hex}}",
c2 = "{{colors.primary.default.hex}}",
c3 = "{{colors.tertiary.default.hex}}",
c4 = "{{colors.secondary.default.hex}}",
c5 = "{{colors.primary_container.default.hex}}",
c6 = "{{colors.secondary_container.default.hex}}",
c7 = "{{colors.on_surface.default.hex}}",
c8 = "{{colors.surface_variant.default.hex}}",
c9 = "{{colors.error_container.default.hex}}",
c10 = "{{colors.inverse_primary.default.hex}}",
c11 = "{{colors.on_tertiary_container.default.hex}}",
c12 = "{{colors.on_secondary_container.default.hex}}",
c13 = "{{colors.on_primary_container.default.hex}}",
c14 = "{{colors.on_surface_variant.default.hex}}",
c15 = "{{colors.inverse_surface.default.hex}}",
tbg = "{{colors.surface.default.hex | set_lightness: 4.0}}", -- Matugen filters usually not inline
2026-01-20 12:33:06 +01:00
}
local hl = function(group, opts)
vim.api.nvim_set_hl(0, group, opts)
end
-- Base
hl("Normal", { fg = c.fg, bg = c.bg })
hl("Cursor", { fg = c.bg, bg = c.cursor })
hl("LineNr", { fg = c.c8 })
hl("CursorLine", { bg = c.c0 })
hl("StatusLine", { fg = c.fg, bg = c.c0 })
2026-02-01 23:10:23 +01:00
-- Harpoon Colors
hl("HarpoonInactive", { fg = c.fg, bg = c.bg })
hl("HarpoonActive", { fg = c.bg, bg = c.c2 })
hl("HarpoonNumberInactive", { fg = c.fg, bg = c.bg })
hl("HarpoonNumberActive", { fg = c.bg, bg = c.c2 })
hl("TabLineFill", { fg = c.fg, bg = c.bg })
2026-01-20 12:33:06 +01:00
-- Syntax
hl("Comment", { fg = c.c8, italic = true })
hl("Constant", { fg = c.c3 })
hl("String", { fg = c.c2 })
hl("Identifier", { fg = c.c4 })
hl("Function", { fg = c.c4, bold = true })
hl("Statement", { fg = c.c5 })
hl("Keyword", { fg = c.c5 })
hl("Type", { fg = c.c6 })
hl("Special", { fg = c.c1 })
-- UI
hl("Pmenu", { fg = c.fg, bg = c.c0 })
hl("PmenuSel", { fg = c.c0, bg = c.c4 })
hl("WinSeparator", { fg = c.c8 })
-- BARBAR
hl("BufferCurrent", { fg = c.fg, bg = c.bg, bold = true })
hl("BufferCurrentIndex", { fg = c.c4, bg = c.bg })
hl("BufferCurrentMod", { fg = c.c3, bg = c.bg })
hl("BufferCurrentSign", { fg = c.c4, bg = c.bg })
hl("BufferCurrentTarget", { fg = c.c1, bg = c.bg, bold = true })
hl("BufferInactive", { fg = c.c8, bg = c.bg })
hl("BufferInactiveIndex", { fg = c.c8, bg = c.bg })
hl("BufferInactiveMod", { fg = c.c8, bg = c.bg })
hl("BufferInactiveSign", { fg = c.c8, bg = c.bg })
hl("BufferInactiveTarget", { fg = c.c8, bg = c.bg, bold = true })
hl("BufferVisible", { fg = c.fg, bg = c.c0 })
hl("BufferVisibleIndex", { fg = c.fg, bg = c.c0 })
hl("BufferVisibleMod", { fg = c.c3, bg = c.c0 })
hl("BufferVisibleSign", { fg = c.c4, bg = c.c0 })
hl("BufferVisibleTarget", { fg = c.c1, bg = c.c0, bold = true })
hl("BufferTabpageFill", { fg = c.c0, bg = c.bg })
hl("TelescopeNormal", { bg = c.tbg })
-- MARKDOWN
hl("RenderMarkdownH1", { fg = c.c4, bold = true })
hl("RenderMarkdownH2", { fg = c.c3, bold = true })
hl("RenderMarkdownH3", { fg = c.c2, bold = true })
hl("RenderMarkdownH4", { fg = c.c5, bold = true })
hl("RenderMarkdownH5", { fg = c.c6, bold = true })
hl("RenderMarkdownH6", { fg = c.c1, bold = true })
hl("RenderMarkdownH1Bg", { bg = c.c0 })
hl("RenderMarkdownH2Bg", { bg = c.c0 })
hl("RenderMarkdownH3Bg", { bg = c.c0 })
hl("RenderMarkdownH4Bg", { bg = c.c0 })
hl("RenderMarkdownH5Bg", { bg = c.c0 })
hl("RenderMarkdownH6Bg", { bg = c.c0 })
hl("RenderMarkdownCode", { bg = c.tbg })
hl("RenderMarkdownCodeInline", { fg = c.c4, bg = c.tbg })
hl("RenderMarkdownBullet", { fg = c.c3 })
hl("RenderMarkdownQuote", { fg = c.c8 })
hl("RenderMarkdownDash", { fg = c.c8 })
hl("RenderMarkdownSign", { fg = c.c8 })
hl("RenderMarkdownInfo", { fg = c.c4, bg = c.c0 })
hl("RenderMarkdownSuccess", { fg = c.c2, bg = c.c0 })
hl("RenderMarkdownWarn", { fg = c.c3, bg = c.c0 })
hl("RenderMarkdownError", { fg = c.c1, bg = c.c0 })
hl("RenderMarkdownHint", { fg = c.c6, bg = c.c0 })
hl("RenderMarkdownUnchecked", { fg = c.c8 })
hl("RenderMarkdownChecked", { fg = c.c2 })