morhetz / gruvbox

Retro groove color scheme for Vim
13.85k stars 1.11k forks source link

Heading colour compatibility with render-markdown plugin #462

Closed SebastianMusic closed 1 month ago

SebastianMusic commented 1 month ago

Hello, this is my first issue ever on github so please redirect me if i posted this in the wrong place.

I wanted to use this plugin for rendering markdown in my neovim. I came across an issue pretty quickly though, which was that the gruvbox colorscheme did not apply to the markdown headings. As you can see in the image below

image

I ended up finding a fix for it though so now it looks like this. You can add background colours yourself but i prefer a transparent background

image

I simply added the code snippet under to my overrides inside of the opts of the gruvbox.lua colorscheme file. I based the colours of how the obsidian gruvbox theme colours different headings, and i took the hex values from the colour pallete on the nvim gruvbox github page.

-- add colour code inside of bg=' ' if you want background colours
   overrides = {
      RenderMarkdownH1Bg = { fg = '#cc241d', bg = '', bold = true },
      RenderMarkdownH2Bg = { fg = '#d79921', bg = '', bold = true },
      RenderMarkdownH3Bg = { fg = '#98971a', bg = '', bold = true },
      RenderMarkdownH4Bg = { fg = '#689d6a', bg = '', bold = true },
      RenderMarkdownH5Bg = { fg = '#458588', bg = '', bold = true },
      RenderMarkdownH6Bg = { fg = '#b16286', bg = '', bold = true },
    },

The goal of this issue is help add compatabillity with the render-markdown nvim plugin. And to present a current solution for those looking for one.

SebastianMusic commented 1 month ago

I posted on the wrong repo