Has anybody figured out how to have VS Code correctly auto-format .ejs files? I've followed the tips in this post, but nothing seems to be working for me.
Has anybody figured out how to have VS Code correctly auto-format .ejs files? I've followed the tips in this post, but nothing seems to be working for me.
Looks like the users in this thread was looking for such a way as well. The answer seems to be:
EJS language support plugin <? for( let item of array ) { ?>
(some data)
<? } ?>
are formatted incorrectly (at least with default html formatter).
To fix this, you can try set custom delimeter to '?' ejs.delimeter = '?'. Now you have correct indentation with <? ... ?> tags.
To use the snippets with our custom delimeter, you need to edit extension snippets (or add your own): install Snippets Ranger plugin, then find needed extension and edit its file. The Snippets Ranger is very handy tool.
User Victor Gorban seems to be used to doing this so reaching out to him wouldn't be a bad idea.