kokororin / vscode-phpfmt

Integrates phpfmt into VS Code
https://marketplace.visualstudio.com/items?itemName=kokororin.vscode-phpfmt
BSD 3-Clause "New" or "Revised" License
129 stars 30 forks source link

How to disable triming spaces from <?= ... ?> to <?=...?> in short echo tag? #153

Open IkotikI opened 1 month ago

IkotikI commented 1 month ago

So, on save in short echo tags <?= ... ?> spaces before and after trimmed after formatting. Example: Before: <?= $name ?> After: <?=$name?>

How to disable it? In normal tags <?php ... ?> nothing trimmed, and that's what I need.

driade commented 1 month ago

Hi @IkotikI. I'm sorry I don't think you can avoid do this, formatting the spaces this way it's in the inner part of the rules, not an special one you can active/deactivate

driade commented 4 weeks ago

Thus, to be more clear, I should create an special rule to make the formatter behave this way, something you could opt in as "KeepSpaceAfterShortOpen", that would run after "ResizeSpaces".

At this moment I'm limiting the number of new rules to be created, as they're time consuming. My goal is to fix errors in the current ones.

Thanks!