Closed mrzool closed 9 years ago
The syntax is lazily loaded and it’s loaded only if the first line begins with a triple dash. When I say the first line I mean literally the first line and not the first non blank line. Moreover, the triple dash line must be there when you open the file otherwise the syntax extension won’t be loaded (so, if you are editing a new file, you need to insert the fist “triple dash” line and then reopen the file :e %
). For me, the example below works
---
title: the example
—
# {{ page.title }}
Other limitations that I would like to remove in the future:
<Leader>e
the file type won’t be recognised as YAML but as Markdown{{ page.title }}
could not be contained in Markdown syntax elements, so in the example above {{ page.title }}
it’s not properly highlighted as it would be if not part of an headerIt should be it, let me know if this works for you.
Thanks a lot, I'll try tomorrow.
Still not working for me...
This is what I get:
Well it kind of does :blush:
All the front matter is grey as it’s supposed to be
Try to move all the front matter a line below and reload the file. This is what it should look like
Also it seems that your current color scheme uses the same color for comments and delimiters, try to change color scheme to see the difference
I see! Just a color scheme issue then. I'm using Molokai, for the record.
Too bad the syntax for liquid tags couldn't be implemented though.
Thanks for the help.
Anyway though, this is how the front matter gets rendered in html files using vim-liquid. Same color scheme of course:
That's why I was tricked into thinking the plugin wasn't working properly.
In the readme you state:
Does this mean the plugin is supposed to enable proper syntax highlighting for Liquid tags and YAML frontmatter?
Because that's not working for me. I've also tried to explicitly set
but that doesn't change anything. Any idea or known bug/limitation?