mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 10:19:02 +00:00
adding rules to indent from within [], (), {}
This commit is contained in:
@@ -218,6 +218,33 @@
|
|||||||
"action": {
|
"action": {
|
||||||
"indent": "outdent"
|
"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",
|
||||||
|
}
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
// https://github.com/microsoft/vscode/issues/43244
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user