Skip to content

Conversation

@choeppler
Copy link

@choeppler choeppler commented Oct 12, 2022

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 (8e2d469) 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

add `*` and `#` to 'surroundingPairs`, so a selection can be surrounded
with `((* *))` and `((# #))`. Previously the selection would be deleted
as soon as `*` or `#` is typed after the two opening parentheses.
- folding configuration in language-configuration-latex.json seems to
  take precedence over that in jinja-latex.tmLanguage.json --> remove
  from latter

- add some additional keywords which can denote blocks to be folded.

  NB: Only enable folding for block assignments, i.e. exlude the code
  blocks with a "set" tag from being a folding start marker when a value
  is assigned to the variable within the code block.
- add some missing keywords / symbols
- update scope names to improve highlighting
@choeppler
Copy link
Author

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

@jrmejiaa
Copy link

jrmejiaa commented Mar 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants