Skip to content

Commit

Permalink
feat(plugins): render-markdown.nvim support
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Lamia committed Oct 10, 2024
1 parent 53d093f commit 6d12b54
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions lua/astrotheme/groups/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
54 changes: 54 additions & 0 deletions lua/astrotheme/groups/plugins/render-markdown.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---@type AstroThemeCallback
local function callback(c)
local color = require "astrotheme.lib.color"

return {
RenderMarkdownH1 = { fg = c.ui.purple, bold = true },
RenderMarkdownH2 = { fg = c.ui.blue, bold = true },
RenderMarkdownH3 = { fg = c.ui.cyan, bold = true },
RenderMarkdownH4 = { fg = c.ui.green, bold = true },
RenderMarkdownH5 = { fg = c.ui.yellow, bold = true },
RenderMarkdownH6 = { fg = c.ui.yellow, bold = true },

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 },
RenderMarkdownCodeInline = { fg = c.syntax.red },
RenderMarkDownBullet = { fg = c.ui.orange, bold = true },
RenderMarkdownChecked = { fg = c.ui.cyan, bold = true },
RenderMarkdownUnchecked = { fg = c.ui.blue, bold = true },
RenderMarkdownTodo = { fg = c.ui.green, bold = true },
RenderMarkDownLink = { fg = c.ui.blue, bold = true },
}
end

return callback

0 comments on commit 6d12b54

Please sign in to comment.