Closed kevinrobayna closed 3 months ago
The hl group is RenderMarkdownCode
The hl group is
RenderMarkdownCode
oh! That solves a bit of the issue.
There's a weird black line under the code block.
So you would not be interested in allowing the users to avoid the highlight group setting?
You can already easily override the group using on_highlights
. Not needed to add a separate config option for that.
That weird black line you see is probably the thin
border for the markdown.nvim plugin.
I thought that was the same hl group. No idea. Check the tokyonight.nvim and markdown.nvim code
I figured it out. Thank you for your pointers!
{
"MeanderingProgrammer/markdown.nvim",
opts = {
code = {
-- NOTE: Remove borders of code blocks
above = "",
below = "",
},
},
config = function(_, opts)
require("render-markdown").setup(opts)
-- NOTE: This needs to be after the setup
vim.cmd([[highlight RenderMarkdownCode guibg=none]])
vim.cmd([[highlight RenderMarkdownCodeBorder guibg=none]])
end,
},
This is the config I wrote to make the colours were applied and also removed the characters for the borders that the plugin defaults to.
I tried doing it on the tokyo config but it was being overridden for some reason
on_highlights = function(hl, c)
hl.RenderMarkdownCode = {
bg = c.none,
}
hl.RenderMarkdownCodeBorder = {
bg = c.none,
}
end,
Did you check the docs?
Is your feature request related to a problem? Please describe.
With the recent change in https://github.com/LazyVim/LazyVim/pull/4139 to use MeanderingProgrammer/markdown.nvim. I lost the ability to hack the bg colour of the code blocks so that my full IDE was transparent.
__
Describe the solution you'd like
Currently, with toyko you can configure several different styles and I think letting the user choose how the code_blocks appear might be beneficial as I can see this being a user preference
Describe alternatives you've considered
I tried to keep using my hack but it does not work now (I didn't try too hard if I'm honest)
Additional context
I'd be happy to give it a go but I wanted to ask first