feat: Add markdown.nvim integration (#740)

* feat: Add markdown.nvim integration

* fix: option order

* fix: Use `render-markdown` name in README
This commit is contained in:
Omar Valdez 2024-08-02 15:49:20 -07:00 committed by GitHub
parent 10eda02ea4
commit ba41328267
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 43 additions and 0 deletions

View file

@ -1326,6 +1326,20 @@ To use another flavour just replace `mocha` with the one you want to use.
</tr>
<!-- reactive.nvim -->
<!-- markdown.nvim -->
</tr>
<tr>
<td> <a href="https://github.com/MeanderingProgrammer/markdown.nvim">render-markdown (markdown.nvim)</a> </td>
<td>
```lua
render_markdown = true
```
</td>
</tr>
<!-- markdown.nvim -->
<!-- symbols-outline.nvim -->
</tr>
<tr>

View file

@ -0,0 +1,27 @@
local M = {}
-- markdown.nvim highlight groups:
-- https://github.com/MeanderingProgrammer/markdown.nvim?tab=readme-ov-file#colors
function M.get()
local groups = {
RenderMarkdownCode = { bg = C.surface0 },
RenderMarkdownCodeInline = { bg = C.surface1 },
RenderMarkdownBullet = { fg = C.sky },
RenderMarkdownTableHead = { fg = C.blue },
RenderMarkdownTableRow = { fg = C.lavender },
}
local syntax = require("catppuccin.groups.syntax").get()
local base = not O.transparent_background and C.base or nil
for i = 1, 6 do
local color = syntax["rainbow" .. i].fg
groups["RenderMarkdownH" .. i] = { fg = color }
groups["RenderMarkdownH" .. i .. "Bg"] = { bg = U.darken(color, 0.30, base) }
end
return groups
end
return M

View file

@ -52,6 +52,7 @@ local M = {
nvimtree = true,
ufo = true,
rainbow_delimiters = true,
render_markdown = true,
semantic_tokens = not is_vim,
telescope = { enabled = true },
treesitter = not is_vim,

View file

@ -192,6 +192,7 @@
---@field overseer boolean?
---@field pounce boolean?
---@field rainbow_delimiters boolean?
---@field render_markdown boolean?
---@field sandwich boolean?
---@field semantic_tokens boolean?
---@field symbols_outline boolean?