atom-jinja2
atom-jinja2 copied to clipboard
[Needs Some Work] Add json.j2 to supported file types
So, i tried joining source.jinja and source.json, and it works pretty well, but:
There is issue with first {% %} being marked as invalid(and breaking rest of the code) when inside {} JSON-object, i don't know how to override this. Any help would be appreciated.
{% %} placed outside JSON-object works correctly.
@then0rTh hey did you ever figure out your issue? I'm very interested in using json.j2 as well.
@danielchatfield would you be able to look into this?
@AlJohri nope, no progress. The atom grammar is just over my head and i dont think i will find the time to dig into it, tho it would be nice to get it working.
I tried to combine js with jinja and use it for json.j2. Solved the problem with {% %} being marked as invalid, but when inside { }, the {% %} loose its syntax hi-light and becomes white - but its something.
{% block name %} <-- correct color
{% endblock %}
{
"name": "Whatever", <-- (js color - not as nice as json)
{% block name2 %} <-- (no color)
{% endblock %}
}
The good news is we can have .js.j2 :)
Any updates on this PR? Would be very nice to have it working