Skip to content

Commit 933c426

Browse files
fix(js/ts): fix javascript and typescript indentation rules for auto indent
1 parent a2122bf commit 933c426

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

grammars/javascript/language-configuration.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,9 @@
3131
"start": "^\\s*//\\s*#?region\\b",
3232
"end": "^\\s*//\\s*#?endregion\\b"
3333
}
34+
},
35+
"indentationRules": {
36+
"increaseIndentPattern": "^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$",
37+
"decreaseIndentPattern": "/^((?!.*?\\/\\*).*\\*\\/)?\\s*[\\}\\]\\)].*$/"
3438
}
3539
}

grammars/typescript/language-configuration.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,9 @@
3232
"start": "^\\s*//\\s*#?region\\b",
3333
"end": "^\\s*//\\s*#?endregion\\b"
3434
}
35+
},
36+
"indentationRules": {
37+
"increaseIndentPattern": "^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$",
38+
"decreaseIndentPattern": "/^((?!.*?\\/\\*).*\\*\\/)?\\s*[\\}\\]\\)].*$/"
3539
}
3640
}

0 commit comments

Comments
 (0)