web-mode
web-mode copied to clipboard
How to set indentation of JavaScript within Twig blocks inside inline JavaScript?
Is there a way to set web-mode to indent JavaScript inside Twig blocks that are inside inline JavaScript?
Now when I try to indent the console.log
line it stays this way:
<script>
{% if condition %}
console.log('Current indentation');
{% endif %}
</script>
I want it to behave this way:
<script>
{% if condition %}
console.log('Current indentation');
{% endif %}
</script>
I tried some padding/indenting options, but couldn't find one to do what I wanted. Is that possible? Thanks!