adding rules to indent from within [], (), {}

This commit is contained in:
Aiday Marlen Kyzy 2024-03-21 17:30:16 +01:00
parent b40321263d
commit d8a989efdd
No known key found for this signature in database
GPG key ID: 24A8B53DBD26FF4E
2 changed files with 29 additions and 2 deletions

View file

@ -218,6 +218,33 @@
"action": {
"indent": "outdent"
}
}
},
// Indent when pressing enter from inside ()
{
"beforeText": "^.*\\([^\\)]*$",
"afterText": "^[^\\(]*\\).*$",
"action": {
"indent": "indentOutdent",
"appendText": "\t",
}
},
// Indent when pressing enter from inside {}
{
"beforeText": "^.*\\{[^\\}]*$",
"afterText": "^[^\\{]*\\}.*$",
"action": {
"indent": "indentOutdent",
"appendText": "\t",
}
},
// Indent when pressing enter from inside []
{
"beforeText": "^.*\\[[^\\]]*$",
"afterText": "^[^\\[]*\\].*$",
"action": {
"indent": "indentOutdent",
"appendText": "\t",
}
},
]
}

View file

@ -838,7 +838,7 @@ suite('`Full` Auto Indent On Type - TypeScript/JavaScript', () => {
});
});
test.skip('issue #43244: indent when lambda arrow function is detected, outdent when end is reached', () => {
test('issue #43244: indent when lambda arrow function is detected, outdent when end is reached', () => {
// https://github.com/microsoft/vscode/issues/43244