MeanderingProgrammer / markdown.nvim

Plugin to improve viewing Markdown files in Neovim
MIT License
504 stars 20 forks source link

Change color of Headings #48

Closed liston closed 2 weeks ago

liston commented 2 weeks ago

Not really an issue, but it is not obvious to me looking at the documentation on how to change the colors of h1, h2, h3 etc.

MeanderingProgrammer commented 2 weeks ago

Ah, I'll work on a better layout to explain what to edit to have what effect.

In this particular case you would provide highlights -> heading -> backgrounds / foregrounds.

The highlight for backgrounds is used for the line and foregrounds is used for the text.

The plugin indexes into the lists based on the level, so h4's get the 4th element. If you provide fewer elements we simply use the last one. So if you provide 3 elements we use the 3rd for an h4.

Hope that makes sense!