vim-pandoc / vim-pandoc-syntax

pandoc markdown syntax, to be installed alongside vim-pandoc
MIT License
425 stars 61 forks source link

Add an autocommand to re-add highlight groups #388

Closed jez closed 7 months ago

jez commented 9 months ago

Fixes #211 Fixes #376

The relevant motivation and summary are in the comment that I've left behind in the file.

I will mention that this technique is not uncommon:

https://github.com/search?q=%2Fautocmd+ColorScheme%2F&type=code

A similar pattern comes up in most other syntax files that define custom highlighting groups.

Before

https://github.com/vim-pandoc/vim-pandoc-syntax/assets/5544532/228d5895-4921-4073-837c-bcd27b814fa9

After

https://github.com/vim-pandoc/vim-pandoc-syntax/assets/5544532/8cdc26ad-33b4-44cf-9a8e-f4698bcfea17

jez commented 8 months ago

Friendly bump on this! @alerque or @fmoralesc I'd love if one of you two had a moment to take a look at this. Happy to make changes as needed.

Thanks in advance.

alerque commented 7 months ago

Sorry it took so long for this to hit my radar at a time when I had time to actually read it. It's an obvious win. Thanks for the contribution.

jez commented 7 months ago

No worries, thanks for the review and Happy Thanksgiving 🙏