How can I keep the spacing between brackets for arguments? #342
-
Hi! I'm trying out twig-cs-fixer and like a lot of the formatting that is being done! Considering the diff below; how can I keep the spaces between brackets for arguments, so the diff is not like this: - {% trans with { 'engagementName': engagementName } %}
+ {% trans with {engagementName: engagementName} %} But like this: - {% trans with { 'engagementName': engagementName } %}
+ {% trans with { engagementName: engagementName } %} I tried the twig-cs-fixer ruleset, and disabling the $ruleset
->addStandard(new TwigCsFixer())
->removeRule(NamedArgumentSpacingRule::class)
; |
Beta Was this translation helpful? Give feedback.
Answered by
VincentLanglet
Dec 17, 2024
Replies: 1 comment
-
You should look at the PunctuationSpacingRule You can even configure it with |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
darthf1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should look at the PunctuationSpacingRule
https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/src/Rules/Punctuation/PunctuationSpacingRule.php
You can even configure it with
['}' => 1], ['{' => 1]