Closed
Description
So shopify has a new {% schema %}
tag inside of which you have to place json it'd be nice to have json highlighting and indentation rules in there I'm trying to solve it myself but my vim skills are not that sharp here's my solution so far:
after/syntax/liquid.vim
if exists("b:current_syntax")
unlet b:current_syntax
endif
syn include @JSON syntax/json.vim
syn region nestedJSON
\ matchgroup=liquidDelimiter
\ start="{% schema %}"
\ keepend
\ end="\n{% endschema %}"me=s-2
\ contains=@JSON
Which results in this:
So that gives me the inner parts of the schema with JSON highlighting but the {% schema %}
word itself if colored all in liquidDelimiter colors instead of liquidDelimiter liquidStatement liquidDelimiter like the {% endschema %}
keyword.
Also still no indentation rules applied so far.
Do you have any suggestions on how to improve this? 😄
Thanks a lot for your awesome work for the vim world
Metadata
Metadata
Assignees
Labels
No labels