projekt0n / github-nvim-theme

GitHub's Neovim themes
MIT License
2.08k stars 105 forks source link

customize markdown code block highlighting #191

Closed msvechla closed 1 year ago

msvechla commented 2 years ago

Hi and thanks for this awesome theme!

I was trying to customize the background color of fenced code blocks in markdown files via the following snippet in my init.lua:

require('github-theme').setup({
    dev = true,
    overrides = function(c)
        return {
          markdownCodeBlock = { bg = "#fb94ff" },
        }
    end
})

This however has no effect. I tried multiple things but could not get it working. Do you have any idea what I am doing wrong?

Thanks a lot for your help!

ful1e5 commented 2 years ago

Try with the markdownTSLiteral highlight if you are using treesiitter.

require('github-theme').setup({
    dev = true,
    overrides = function(c)
        return {
          markdownTSLiteral = { bg = "#fb94ff" },
        }
    end
})
ful1e5 commented 1 year ago

Closing due to inactivity. Can reopen later.