Which Antlers Toolbox products are you requesting a feature for?
[X] Antlers Toolbox for VS Code
[ ] Antlers Toolbox for VS Code Formatter
[ ] Formatter CLI
[X] Antlers Prettier Plugin
[ ] Antlers Syntax Highlighting (external systems - not VS Code)
Is your feature request related to a problem? Please describe.
Sometimes I run into formatting issues when doing Antlers stuff inside a <script> tag in an Antlers view.
For example: here's something I'm doing right now which messes up with the formatting for all the JS code under it:
<script>
// Set value of 'building' field to the current building
{{ nav from="/locations" select="title|slug" :slug:is="segment_2" }}
if (window.location.includes('{{ slug }}')) {
document.getElementById('contactFormModalForm').building.value = '{{ title }}';
}
{{ /nav }}
// ...
</script>
You could argue that Antlers could probably not do the weird indentation formatting it does right now instead of just ignoring it...
Describe the solution you'd like
Right now I can disable formatting for the entire Antlers view which I don't always want to do.
Ideally, I'd like a way to ignore formatting between specific lines. I'm not 100% sure how this would work but maybe with a code comment at the top of the block, then one at the end to mark the start/end for the block where no formatting should take place.
Describe alternatives you've considered
Disabling formatting for the entire Antlers view.
Which Antlers Toolbox products are you requesting a feature for?
Is your feature request related to a problem? Please describe.
Sometimes I run into formatting issues when doing Antlers stuff inside a
<script>
tag in an Antlers view.For example: here's something I'm doing right now which messes up with the formatting for all the JS code under it:
You could argue that Antlers could probably not do the weird indentation formatting it does right now instead of just ignoring it...
Describe the solution you'd like Right now I can disable formatting for the entire Antlers view which I don't always want to do.
Ideally, I'd like a way to ignore formatting between specific lines. I'm not 100% sure how this would work but maybe with a code comment at the top of the block, then one at the end to mark the start/end for the block where no formatting should take place.
Describe alternatives you've considered Disabling formatting for the entire Antlers view.