Closed MusherM closed 3 months ago
This is up to the color scheme you use, the demos use https://github.com/folke/tokyonight.nvim.
The heading background highlight groups are RenderMarkdownH1Bg
... RenderMarkdownH6Bg
, which if not directly supported by your color scheme default to DiffAdd
, DiffChange
, and DiffDelete
. The values for those will determine the behavior and you can change them to whatever values you want with:
require('render-markdown').setup({
heading = {
backgrounds = {
'Group1',
'Group2',
'Group3',
'Group4',
'Group5',
'Group6',
},
},
})
Thx for your reply! I'm now using NVChad and Lazy.nvim, as I type :highlight DiffChange, it give me something like DiffChange xxx guifg=#605f6f, and I guess that means this hight light group is provided.
I found similar problems with colors occuring when someone else using AutoSession with base46(color selector of NVChad), and I'm using another session manager, after disabling it, I got highlight background color with color code like #000, but the problem I mentioned remains unsolved.
Now I'm guessing it's related to the plugin loading order of Lazy.nvim or still related to my sessionManager plugin, I'm still digging out, I'd appreciate it if you can provide any advice!
Ah the DiffChange
in your case provides only guifg
hence why there is no background. In my case it provides a guibg
, which I thought was the more usual behavior. You'll need to manually provide / create some highlight groups with a background or use a different color scheme.
Well that makes sense, I found no theme provides BG color in NVChad default themes, maybe that's intentional. I'll continue to dig out how to get a highlight group that matches my color theme. Really helps, thx a lot
Well ,by adding this to chadrc.lua, I got the bg color, though I still find it not so well-looked like yours haha. Anyway, that helps!
M.base46 = {
theme = "catppuccin",
hl_override = {
DiffAdd = {
bg = "one_bg",
fg = "orange",
},
DiffChange = {
bg = "one_bg2",
fg = "blue",
},
DiffDelete = {
bg = "one_bg3",
fg = "cyan",
},
},
}
Neovim version (nvim -v)
0.10.1
Operating system
MacOS Sonoma
Terminal emulator / GUI
iTerm2
Describe the bug
I dont understand why mine looks so different from the look in the readme
Expected behavior
Heading with proper colors
Healthcheck output
============================================================================== render-markdown: require("render-markdown.health").check()
render-markdown.nvim [version] ~
render-markdown.nvim [configuration] ~
render-markdown.nvim [nvim-treesitter] ~
render-markdown.nvim [executables] ~
render-markdown.nvim [conflicts] ~
Plugin configuration
Installed with Lazy.nvim
Confirmations
Additional information
No response