Variable: php-ts-mode-html-relative-indent

php-ts-mode-html-relative-indent is a customizable variable defined in php-ts-mode.el.gz.

Value

t

Documentation

How PHP code is indented relative to the HTML tags.

When t, the default, indentation looks like:

  <html>
    ...
    <div>
       <?php
       ?>
    </div>

When nil, indentation of the tag body starts just below the tag, like:

  <html>
    ...
    <div>
    <?php
    ?>
    </div>

When ignore, the tag body starts in the first column, like:

  <html>
    ...
    <div>
  <?php
  ?>
    </div>

This variable was added, or its default value changed, in Emacs 31.1.

Probably introduced at or before Emacs version 31.1.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/php-ts-mode.el.gz
(defcustom php-ts-mode-html-relative-indent t
  "How PHP code is indented relative to the HTML tags.

When t, the default, indentation looks like:

  <html>
    ...
    <div>
       <?php
       ?>
    </div>

When nil, indentation of the tag body starts just below the
tag, like:

  <html>
    ...
    <div>
    <?php
    ?>
    </div>

When `ignore', the tag body starts in the first column, like:

  <html>
    ...
    <div>
  <?php
  ?>
    </div>"
  :type '(choice
          (const :tag "Indent starts just below the HTML tag" nil)
          (const :tag "Indent relative to the HTML tag" t)
          (const :tag "Always in the first column" ignore))
  :safe 'symbolp
  :tag "PHP indent relative to HTML"
  :version "31.1")