Skip to content

Commit 77ff4e0

Browse files
committed
Indent Rules for PHP
1 parent 1813139 commit 77ff4e0

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

extensions/php/language-configuration.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
{ "open": "(", "close": ")", "notIn": ["string"] },
1515
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
1616
{ "open": "\"", "close": "\"", "notIn": ["string"] }
17-
]
18-
17+
],
18+
"indentationRules": {
19+
"increaseIndentPattern": "({(?!.+}).*|\\(|\\[|((else)?if|else|for(each)?|while|switch).*:)\\s*(/[/*].*)?$",
20+
"decreaseIndentPattern": "^(.*\\*/)?\\s*(}|(\\)+([;,]|\\s*{))|(\\]\\)*([;,]|$))|else:|((end(if|for(each)?|while|switch));))"
21+
}
1922
}

0 commit comments

Comments
 (0)