bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.64k stars 94 forks source link

Disable moving php tag to line beginning inside php block #1000

Open haithamalnaeb opened 4 years ago

haithamalnaeb commented 4 years ago

To Reproduce Write this code:

<?php
function foo($a, $b)
{
    if ($a) {
        if ($b) {
            ?>
            <div>test</div>
            <?php
        }
    }
}

After formatting, you'll get this one:

<?php
function foo($a, $b)
{
    if ($a) {
        if ($b) {
?>
            <div>test</div>
<?php
        }
    }
}

Platform and version Win 10, latest versions

kanlukasz commented 4 years ago

I have the same problem Especially problematic with Wordpress templating

cdsaenz commented 7 months ago

I love the Intelephense Formatter, it respects my spacing etc, this is perhaps the only (tiny but meaningful) gripe I have about it (I keep moving the tags to its rightful place after the formatting :) )