You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When formatting Twig files using Prettier with the prettier-plugin-twig, I'm having trouble achieving the desired indentation for method chaining within a href attribute. Currently, the methods are not placed on new lines in a way that I find readable.
Here is the formatting result I get after using Prettier:
Expected Behavior :
I would like the formatter to break lines properly, with each method in the chain starting on a new line for better readability, as shown below:
Is this the expected behavior or am I misusing the plugin or Prettier's configuration? I suspect I may not fully understand how to configure Prettier or the plugin correctly to achieve my desired result.
I really appreciate the work you've done on this plugin! Thank you for your time! 😊
The text was updated successfully, but these errors were encountered:
I don't think there's option to configure this plugin to achive your desired result. We have limited option to configure this plugin, and I want to keep it that way.
Fixing function argument to print in a single line might be easy. But I'm not sure how to achive subsequent method chain to be indented and on different line. Need time to investigate.
Maybe I can add some "experimental" feature or option that people can try and then gradually implement it as "official" style for this plugin.
When formatting Twig files using Prettier with the prettier-plugin-twig, I'm having trouble achieving the desired indentation for method chaining within a href attribute. Currently, the methods are not placed on new lines in a way that I find readable.
Here is the formatting result I get after using Prettier:
Expected Behavior :
I would like the formatter to break lines properly, with each method in the chain starting on a new line for better readability, as shown below:
Here is my current Prettier configuration:
Is this the expected behavior or am I misusing the plugin or Prettier's configuration? I suspect I may not fully understand how to configure Prettier or the plugin correctly to achieve my desired result.
I really appreciate the work you've done on this plugin! Thank you for your time! 😊
The text was updated successfully, but these errors were encountered: