mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 10:19:02 +00:00
Update indentation for PHP, JS, and TS (#251465)
* Update indentation for PHP, JS, and TS. Addresses https://github.com/microsoft/vscode/issues/136592 - For PHP, auto-indent after `if`, `elseif`, `else if`, `while`, `for` and `foreach`. This also fixes an issue where hitting Enter on a blank line below a single line `if` (or other) results in an extra tab. - For PHP, extra dot after `*/` and blank line. - For JS/TS, auto-indent for `else` to be consistent with handling of `if` statements * polish --------- Co-authored-by: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
This commit is contained in:
@@ -139,7 +139,7 @@
|
||||
"pattern": "^(\\t|[ ])*[ ]\\*[^/]*\\*/\\s*$|^(\\t|[ ])*[ ]\\*/\\s*$|^(\\t|[ ])*\\*([ ]([^\\*]|\\*(?!/))*)?$"
|
||||
},
|
||||
"indentNextLinePattern": {
|
||||
"pattern": "^((.*=>\\s*)|((.*[^\\w]+|\\s*)(if|while|for)\\s*\\(.*\\)\\s*))$"
|
||||
"pattern": "^((.*=>\\s*)|((.*[^\\w]+|\\s*)((if|while|for)\\s*\\(.*\\)\\s*|else\\s*)))$"
|
||||
}
|
||||
},
|
||||
"onEnterRules": [
|
||||
|
||||
Reference in New Issue
Block a user