Support for indentation of PHP alternative syntax control structures
For some control structures, PHP provides an alternative syntax. A new rule has been added to handle this syntax. * lisp/progmodes/php-ts-mode.el (php-ts-mode--indent-styles): New rule for PHP alternative syntax. (Bug#71710)
This commit is contained in:
parent
11fb3510f4
commit
155cc89de0
1 changed files with 6 additions and 0 deletions
|
@ -651,6 +651,12 @@ characters of the current line."
|
|||
|
||||
;; These rules are for cases where the body is bracketless.
|
||||
((match "while" "do_statement") parent-bol 0)
|
||||
;; rule for PHP alternative syntax
|
||||
((or (node-is "else_if_clause")
|
||||
(node-is "endif")
|
||||
(node-is "endforeach")
|
||||
(node-is "endwhile"))
|
||||
parent-bol 0)
|
||||
((or (parent-is "if_statement")
|
||||
(parent-is "else_clause")
|
||||
(parent-is "for_statement")
|
||||
|
|
Loading…
Add table
Reference in a new issue