JS/TS fixes

This commit is contained in:
Stephen Sigwart
2022-11-21 21:41:18 -05:00
parent a9dac55c8a
commit 3894c48a02
2 changed files with 12 additions and 3 deletions

View File

@@ -188,6 +188,15 @@
"action": {
"indent": "indent"
}
},
{
// Decrease indentation after single line if/else if/else, for, or while
"previousLineText": "^\\s*(((else ?)?if|for|while)\\s*\\(.*\\)\\s*|else\\s*)$",
// But make sure line doesn't have braces or is not another if statement
"beforeText": "^\\s+([^{i\\s]|i(?!f\\b))",
"action": {
"indent": "outdent"
}
}
]
}