Skip to content

Commit ad44453

Browse files
authored
feat(plugins): render-markdown.nvim support (#149)
squashme! sqaushme!
1 parent 1393cb3 commit ad44453

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

lua/astrotheme/groups/plugins/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ return {
2828
["nvim-web-devicons"] = "nvim-web-devicons",
2929
["nvim-window-picker"] = "nvim-window-picker",
3030
["rainbow-delimiters.nvim"] = "rainbow-delimiters",
31+
["render-markdown.nvim"] = "render-markdown",
3132
["spotlight.nvim"] = "spotlight",
3233
["symbols-outline.nvim"] = "symbols-outline",
3334
["telescope.nvim"] = "telescope",
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---@type AstroThemeCallback
2+
local function callback(c)
3+
local color = require "astrotheme.lib.color"
4+
5+
return {
6+
RenderMarkdownH1 = { link = "@markup.heading.1.markdown" },
7+
RenderMarkdownH2 = { link = "@markup.heading.2.markdown" },
8+
RenderMarkdownH3 = { link = "@markup.heading.3.markdown" },
9+
RenderMarkdownH4 = { link = "@markup.heading.4.markdown" },
10+
RenderMarkdownH5 = { link = "@markup.heading.5.markdown" },
11+
RenderMarkdownH6 = { link = "@markup.heading.6.markdown" },
12+
13+
RenderMarkdownH1Bg = {
14+
fg = c.syntax.purple,
15+
bg = color.new(c.syntax.purple):blend(color.new(c.ui.base), 0.75):tohex(),
16+
bold = true,
17+
},
18+
RenderMarkdownH2Bg = {
19+
fg = c.syntax.blue,
20+
bg = color.new(c.syntax.blue):blend(color.new(c.ui.base), 0.75):tohex(),
21+
bold = true,
22+
},
23+
RenderMarkdownH3Bg = {
24+
fg = c.syntax.cyan,
25+
bg = color.new(c.syntax.cyan):blend(color.new(c.ui.base), 0.75):tohex(),
26+
bold = true,
27+
},
28+
RenderMarkdownH4Bg = {
29+
fg = c.syntax.green,
30+
bg = color.new(c.syntax.green):blend(color.new(c.ui.base), 0.75):tohex(),
31+
bold = true,
32+
},
33+
RenderMarkdownH5Bg = {
34+
fg = c.syntax.yellow,
35+
bg = color.new(c.syntax.yellow):blend(color.new(c.ui.base), 0.75):tohex(),
36+
bold = true,
37+
},
38+
RenderMarkdownH6Bg = {
39+
fg = c.syntax.purple,
40+
bg = color.new(c.syntax.yellow):blend(color.new(c.ui.base), 0.75):tohex(),
41+
bold = true,
42+
},
43+
44+
RenderMarkdownCode = { bg = c.ui.tool },
45+
RenderMarkDownBullet = { link = "@markup.list.markdown" },
46+
RenderMarkdownChecked = { link = "@markup.list.checked" },
47+
RenderMarkdownUnchecked = { link = "@markup.list.unchecked" },
48+
RenderMarkdownTodo = { fg = c.ui.green, bold = true },
49+
RenderMarkDownLink = { fg = c.ui.blue, bold = true },
50+
}
51+
end
52+
53+
return callback

0 commit comments

Comments
 (0)