navarasu / onedark.nvim

One dark and light colorscheme for neovim >= 0.5.0 written in lua based on Atom's One Dark and Light theme. Additionally, it comes with 5 color variant styles
MIT License
1.61k stars 164 forks source link

Markdown headings show incorrect colours #132

Open leesoh opened 1 year ago

leesoh commented 1 year ago

Hello and happy new year! I love that there's a lua-based version of markdown. Thank you so much for your work on this.

I'm trying to figure out why my markdown headings are showing up as green, not the colours defined here.

I thought it might be an issue with the colour definition itself, but red shows up for bulleted lists just fine. Here's a screenshot:

Screenshot from 2023-01-05 06-01-48

I've also tried defining a custom configuration:

require('onedark').setup {
  highlights = {
    markdownH1 = { fg = '#ffffff'}
  }
}

But this didn't work either. Finally, I thought it might be something to do with my terminal, but I'm seeing the same thing with both gnome-terminal and kitty.

I'm using Neovim v0.7.2.

Any help would be appreciated!

xeluxee commented 1 year ago

If you want markdownH* highlights to be effective you should disable treesitter highlighting for markdown. Otherwise use https://github.com/lukas-reineke/headlines.nvim

yochem commented 1 year ago

The correct highlight group if using treesitter would be @text.title.1.markdown, so your custom config would be:

require('onedark').setup {
  highlights = {
    ["@text.title.1.markdown"] = { fg = '#ffffff'}
  }
}