Add extra PHP alignment rule
This commit is contained in:
parent
c1f26123f7
commit
b12c713889
1 changed files with 17 additions and 1 deletions
|
@ -85,7 +85,23 @@
|
||||||
|
|
||||||
(add-to-list 'align-rules-list
|
(add-to-list 'align-rules-list
|
||||||
`(php-array-arrow
|
`(php-array-arrow
|
||||||
(regexp . ,(rx any (group whitespace) "=>" any))
|
(regexp . ,(rx any (group (zero-or-more whitespace)) "=>" any))
|
||||||
|
(group . (1))
|
||||||
|
(modes . '(php-mode web-mode))
|
||||||
|
(repeat . t)))
|
||||||
|
|
||||||
|
;; The WordPress coding standards specify that multiple assignments
|
||||||
|
;; should have their assignment operators aligned.
|
||||||
|
|
||||||
|
;; <?php
|
||||||
|
;; $variable = "value";
|
||||||
|
;; $other_variable = "other value";
|
||||||
|
;; $one_more_variable = "one more variable";
|
||||||
|
|
||||||
|
(add-to-list align-rules-list
|
||||||
|
`(php-assignment-equals
|
||||||
|
(regexp . ,(rx any (group (zero-or-more whitespace)) "="
|
||||||
|
(zero-or-more whitespace) any))
|
||||||
(group . (1))
|
(group . (1))
|
||||||
(modes . '(php-mode web-mode))
|
(modes . '(php-mode web-mode))
|
||||||
(repeat . t)))
|
(repeat . t)))
|
||||||
|
|
Loading…
Reference in a new issue