Glench / Vim-Jinja2-Syntax

An up-to-date jinja2 syntax file.
https://github.com/mitsuhiko/jinja2
BSD 3-Clause "New" or "Revised" License
345 stars 64 forks source link

Indent file has incorrect spacing when enter after certain lines #35

Open MarkCodesTheWeb opened 2 years ago

MarkCodesTheWeb commented 2 years ago

I'm not really sure how to explain this one but when I click "enter/return" after certain characters it goes to position 200 on the next line.

For example with the following snippet:

{% block content %} {{ Content | safe }} {% endblock %}

If I click return after the first %} or the first }} it will put me on the next line at position 200 (so it's indenting 200 spaces). But if I click return after the last %} it goes to the next line as normal.

My solution, for now, is to just not use the indent file but it would be nice to have it indent properly. I don't understand the script enough to see what is causing this to happen though.

I'm using Astro Vim's default settings and this is the only additional plugin I've added. All the highlighting is working correctly.

MarkCodesTheWeb commented 2 years ago

I forgot to mention, this is in an .njk file. I don't know if that makes any difference.