Is there a way to format the HTML in VSCode when we use Twig or Swig tags, for example
{% if ... %} {%else%} {%endif%} {% for %} {%endfor%} {% include %}, etc...
Code formatting now removes all line breaks before and after these tags.
Could not find a suitable extension for this. There is no way to configure internal code formatting.
I had the same problem and decided to install this extension:
Twig language
Install it, restart the editor, and if you are in windows, you can format them with the standard one ALT + SHIFT + F.
ALT + SHIFT + F
Hope this helps.
Source: https://habr.com/ru/post/1662276/More articles:Problems installing gensim - pythonSQL Pivot Table from query - sqlHow to count objects with a specific day in mongodb and php - phpInsert Jinja2 variables into Javascript - javascriptGitForWindows continues to request OpenSSH password (desired application) - gitWhat is the meaning of the values ββreturned by trader_bbands ()? - phpHow does the {XOR} constraint work in UML? - umlHow to get a numeric float (not a string!) When json_encoding? - phpsetlocale (LC_ALL, 'en_GB.UTF8') does not work on windows - windowsUnsound implicit throw warning not shown for general parameter - dartAll Articles