From e72f6ea4a994ee5f9f3f444cc33c5702920e3d0f Mon Sep 17 00:00:00 2001 From: Shaun Clayton Date: Wed, 24 Jul 2024 17:29:39 -0400 Subject: [PATCH] feat: add support for markdown.nvim (#303) * feat: add support for markdown.nvim * fix: tweaked some highlights to achieve better appearance * fix: adjust heading highlights to use group linking --- lua/rose-pine.lua | 22 ++++++++++++++++++++-- lua/rose-pine/config.lua | 2 +- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua index 3528227..e356688 100644 --- a/lua/rose-pine.lua +++ b/lua/rose-pine.lua @@ -363,7 +363,7 @@ local function set_highlights() ["@markup.heading"] = { fg = palette.foam, bold = styles.bold }, - ["@markup.quote"] = { fg = palette.subtle }, + ["@markup.quote"] = { fg = palette.text }, ["@markup.math"] = { link = "Special" }, ["@markup.environment"] = { link = "Macro" }, ["@markup.environment.name"] = { link = "@type" }, @@ -377,7 +377,7 @@ local function set_highlights() -- ["@markup.raw.block"] = { bg = palette.surface }, ["@markup.raw.delimiter.markdown"] = { fg = palette.subtle }, - ["@markup.list"] = { fg = palette.text }, + ["@markup.list"] = { fg = palette.pine }, ["@markup.list.checked"] = { fg = palette.foam, bg = palette.foam, blend = 10 }, ["@markup.list.unchecked"] = { fg = palette.text }, @@ -923,6 +923,24 @@ local function set_highlights() RainbowDelimiterRed = { fg = palette.love }, RainbowDelimiterViolet = { fg = palette.iris }, RainbowDelimiterYellow = { fg = palette.gold }, + + -- MeanderingProgrammer/markdown.nvim + RenderMarkdownBullet = { fg = palette.rose }, + RenderMarkdownChecked = { fg = palette.foam }, + RenderMarkdownCode = { bg = palette.overlay }, + RenderMarkdownCodeInline = { fg = palette.text, bg = palette.overlay }, + RenderMarkdownDash = { fg = palette.muted }, + RenderMarkdownH1Bg = { bg = groups.h1, blend = 20 }, + RenderMarkdownH2Bg = { bg = groups.h2, blend = 20 }, + RenderMarkdownH3Bg = { bg = groups.h3, blend = 20 }, + RenderMarkdownH4Bg = { bg = groups.h4, blend = 20 }, + RenderMarkdownH5Bg = { bg = groups.h5, blend = 20 }, + RenderMarkdownH6Bg = { bg = groups.h6, blend = 20 }, + RenderMarkdownQuote = { fg = palette.subtle }, + RenderMarkdownTableFill = { link = "Conceal" }, + RenderMarkdownTableHead = { fg = palette.subtle }, + RenderMarkdownTableRow = { fg = palette.subtle }, + RenderMarkdownUnchecked = { fg = palette.subtle }, } local transparency_highlights = { DiagnosticVirtualTextError = { fg = groups.error }, diff --git a/lua/rose-pine/config.lua b/lua/rose-pine/config.lua index cdbec69..eb05330 100644 --- a/lua/rose-pine/config.lua +++ b/lua/rose-pine/config.lua @@ -66,7 +66,7 @@ config.options = { h3 = "rose", h4 = "gold", h5 = "pine", - h6 = "foam", + h6 = "leaf", ---@deprecated Replaced by `options.highlight_groups["Normal"]` -- background = "base",