felixfbecker / vscode-php-intellisense

Advanced PHP IntelliSense for Visual Studio Code 🆚💬
MIT License
409 stars 93 forks source link

PHP + HTML indentation pattern #610

Open SnowRunescape opened 6 months ago

SnowRunescape commented 6 months ago

Currently, the indentation with PHP + HTML leaves the code in this way.

<?php
$teste = "dd";
if ($teste == "dd") {
?>
    <div>
        dsadas
    </div>
<?php
}
?>

What do we need to do to leave it like this:

<?php
$teste = "dd";
if ($teste == "dd") {
    ?>
    <div>
        dsadas
    </div>
    <?php
}
?>

Once inside an IF or FOR, we add 4 spaces for indentation. It doesn't make sense for it to stay in the same sequence as the IF, or even worse, at the beginning of the line without any indentation.