From 369fdc28b1a9fb94fbd5afea3e6324c3474a452d Mon Sep 17 00:00:00 2001 From: A-Lamia Date: Fri, 11 Oct 2024 02:22:43 +1100 Subject: [PATCH] feat(plugins): render-markdown.nvim support squashme! sqaushme! --- lua/astrotheme/groups/plugins/init.lua | 1 + .../groups/plugins/render-markdown.lua | 53 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 lua/astrotheme/groups/plugins/render-markdown.lua diff --git a/lua/astrotheme/groups/plugins/init.lua b/lua/astrotheme/groups/plugins/init.lua index 6e3ff13..4592516 100644 --- a/lua/astrotheme/groups/plugins/init.lua +++ b/lua/astrotheme/groups/plugins/init.lua @@ -28,6 +28,7 @@ return { ["nvim-web-devicons"] = "nvim-web-devicons", ["nvim-window-picker"] = "nvim-window-picker", ["rainbow-delimiters.nvim"] = "rainbow-delimiters", + ["render-markdown.nvim"] = "render-markdown", ["spotlight.nvim"] = "spotlight", ["symbols-outline.nvim"] = "symbols-outline", ["telescope.nvim"] = "telescope", diff --git a/lua/astrotheme/groups/plugins/render-markdown.lua b/lua/astrotheme/groups/plugins/render-markdown.lua new file mode 100644 index 0000000..b7e5ba4 --- /dev/null +++ b/lua/astrotheme/groups/plugins/render-markdown.lua @@ -0,0 +1,53 @@ +---@type AstroThemeCallback +local function callback(c) + local color = require "astrotheme.lib.color" + + return { + RenderMarkdownH1 = { link = "@markup.heading.1.markdown" }, + RenderMarkdownH2 = { link = "@markup.heading.2.markdown" }, + RenderMarkdownH3 = { link = "@markup.heading.3.markdown" }, + RenderMarkdownH4 = { link = "@markup.heading.4.markdown" }, + RenderMarkdownH5 = { link = "@markup.heading.5.markdown" }, + RenderMarkdownH6 = { link = "@markup.heading.6.markdown" }, + + RenderMarkdownH1Bg = { + fg = c.syntax.purple, + bg = color.new(c.syntax.purple):blend(color.new(c.ui.base), 0.75):tohex(), + bold = true, + }, + RenderMarkdownH2Bg = { + fg = c.syntax.blue, + bg = color.new(c.syntax.blue):blend(color.new(c.ui.base), 0.75):tohex(), + bold = true, + }, + RenderMarkdownH3Bg = { + fg = c.syntax.cyan, + bg = color.new(c.syntax.cyan):blend(color.new(c.ui.base), 0.75):tohex(), + bold = true, + }, + RenderMarkdownH4Bg = { + fg = c.syntax.green, + bg = color.new(c.syntax.green):blend(color.new(c.ui.base), 0.75):tohex(), + bold = true, + }, + RenderMarkdownH5Bg = { + fg = c.syntax.yellow, + bg = color.new(c.syntax.yellow):blend(color.new(c.ui.base), 0.75):tohex(), + bold = true, + }, + RenderMarkdownH6Bg = { + fg = c.syntax.purple, + bg = color.new(c.syntax.yellow):blend(color.new(c.ui.base), 0.75):tohex(), + bold = true, + }, + + RenderMarkdownCode = { bg = c.ui.tool }, + RenderMarkDownBullet = { link = "@markup.list.markdown" }, + RenderMarkdownChecked = { link = "@markup.list.checked" }, + RenderMarkdownUnchecked = { link = "@markup.list.unchecked" }, + RenderMarkdownTodo = { fg = c.ui.green, bold = true }, + RenderMarkDownLink = { fg = c.ui.blue, bold = true }, + } +end + +return callback