diff --git a/extensions/typescript-basics/language-configuration.json b/extensions/typescript-basics/language-configuration.json index 6676b50677e..8ba8fb0b860 100644 --- a/extensions/typescript-basics/language-configuration.json +++ b/extensions/typescript-basics/language-configuration.json @@ -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", + } + }, ] } diff --git a/src/vs/editor/contrib/indentation/test/browser/indentation.test.ts b/src/vs/editor/contrib/indentation/test/browser/indentation.test.ts index 793c4c33681..92423c46a70 100644 --- a/src/vs/editor/contrib/indentation/test/browser/indentation.test.ts +++ b/src/vs/editor/contrib/indentation/test/browser/indentation.test.ts @@ -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