-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dont want prettier to format img, button tags in multilines #469
Comments
👋 thanks for reporting, afaik you can't target specific tags to have a different print width than the rest of the file. i think your best bet is to use
would become this:
feel free to open an issue requesting this enhancement tho 🙏 |
When i used liquify or prettier directly. Setting forceattribute to false
in vscode settings.json did the job.
But i cant find a way set this parameter with this one.
As i know its using same prettier there should be a way to send this
parameter as false.
…On Fri, 9 Aug, 2024, 8:00 pm Morisa Manzella, ***@***.***> wrote:
👋 thanks for reporting, afaik you can't target specific tags to have a
different print width than the rest of the file. i think your best bet is
to use {% # prettier-ignore-attributes %} and then format the attributes
the way you like on a single line. so this:
{% # prettier-ignore-attributes %}
<button x-on:click="open = ! open" type="button" class="inline-flex items-center text-base text-gray-500 hover:text-gray-900">
{{ link.title }}
{% render 'icon-dropdown' %}
</button>
would become this:
{% # prettier-ignore-attributes %}
<button
x-on:click="open = ! open" type="button" class="inline-flex items-center text-base text-gray-500 hover:text-gray-900"
>
{{ link.title }}
{% render 'icon-dropdown' %}
</button>
feel free to open an issue requesting this enhancement tho 🙏
—
Reply to this email directly, view it on GitHub
<#469 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASRBZ7JPT5DN4CI5TYSZV5TZQTG6TAVCNFSM6AAAAABMIMOUYKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZYGA4DCNZRGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
When i used liquify or prettier directly. Setting forceattribute to false As i know its using same prettier there should be a way to send this Can you suggest something to set it false? |
👋 Hey @FKFAISALKHAN007, Thank you for reporting this issue. Currently, the extension doesn't support these settings. However, it's a fair feature request, so I'm reopening this issue :) |
using your Extention "Identifier: shopify.theme-check-vscode" with vscode can you help with this?
before format
after format it becomes
can you suggest what has to be switched off ? I want formatter enabled but let attributes on single line.
The text was updated successfully, but these errors were encountered: