fxbois / web-mode

web template editing mode for emacs
https://web-mode.org
GNU General Public License v3.0
1.63k stars 262 forks source link

Disable Indentation directly under PHP tags #1227

Closed VernonGrant closed 2 years ago

VernonGrant commented 2 years ago

Hi, I would like to control the indentation offset directly under PHP tags. Here's an example of what I mean.

With web-mode active, PHP code is automatically indented like this:

<?php

    /**
     * Short function description.
     */
    function say_hello() {
        echo 'Hello';
    }

But our coding standards requires no indentation directly under PHP tags.

<?php

/**
 * Short function description.
 */
function say_hello() {
    echo 'Hello';
}

Is there a way for me to control this via a web-mode setting or something? Thanks in advance!

VernonGrant commented 2 years ago

I found it's was actually just a conflict issue with editorconfig-emacs.

If someone else is having this issue, please see: https://github.com/editorconfig/editorconfig-emacs/issues/79