samuelcolvin / jinjahtml-vscode

Syntax highlighting for jinja(2) html templates in vscode
https://marketplace.visualstudio.com/items?itemName=samuelcolvin.jinjahtml
MIT License
135 stars 53 forks source link

Improve jinja-latex highlighting and folding #122

Open choeppler opened 2 years ago

choeppler commented 2 years ago

As can be seen from the first screenshot below, currently syntax highlighting is inconsistent in jinja-latex mode. I tried to fix this by the patch submitted in this PR. The second screenshot taken "after applying the patches" shows the resulting behavior. To ease testing, I added the example as first commit (8e2d4692b8c5688163905e18690caadfd27fdac5) and the functional changes in subsequent commits. Additionally, the folding config has been updated, so all types of blocks should fold correctly now even if there is no indentation (which seems to add its own folding logic). Finally, the minor update to the surroundingPairs config now allows a selection to be surrounded with ((* *)) or ((# #)). Previously the selection would be deleted as soon as * or # is typed after the two opening parentheses.

Before applying the patches:

before

After applying the patches:

after

edit: update commit reference after force push

choeppler commented 2 years ago

In the force push I just restructured the commits. PR ready to be reviewed :-)

jrmejiaa commented 8 months ago

Hi @samuelcolvin thanks for the amazing extension for VS Code. This looks like an improvement for LaTex templates, why this has been merged?