Change:
Type the following in a TS filePress Enter after the arrow. The cursor is not indented (here cursor is shown by | symbol):We should instead have:

Discussion:
// e.g.  * ...| or */| or *-----*/| "unIndentedLinePattern": { "pattern": "^(t|[ ])*[ ]*[^/]**/s*$|^(t|[ ])*[ ]*/s*$|^(t|[ ])**([ ]([^*]|*(?!/))*)?$" <ins> }, "indentNextLinePattern": { "pattern": "^.*=>s*$" </ins> } }, "onEnterRules": [

ensureNoDisposablesAreLeakedInTestSuite(); <del> // Test added so there is at least one non-ignored test in this suite test('temporary test', () => { assert.ok(true); }); </del> // Failing tests from issues... <del> test.skip('issue #208215: indent after arrow function', () => { </del> <ins> test('issue #208215: indent after arrow function', () => { </ins> // https://github.com/microsoft/vscode/issues/208215 <del> // consider the regex: /^s*(var|const|let)s+w+s*=s*(.*)s*=>s*$/ </del> const model = createTextModel("", languageId, {}); disposables.add(model); withTestCodeEditor(model, { autoIndent: "full" }, (editor, viewModel, instantiationService) => { registerLanguage(instantiationService, languageId, Language.TypeScript, disposables); viewModel.type('const add1 = (n) =>'); viewModel.type("n", 'keyboard'); assert.strictEqual(model.getValue(), [

}); }); <del> test.skip('issue #208215: outdented after semicolon detected after arrow function', () => { </del> <ins> test('issue #208215: indent after arrow function 2', () => { </ins> <del> // Notes: we want to outdent after having detected a semi-colon which marks the end of the line, but only when we have detected an arrow function // We could use one outdent pattern corresponding per indent pattern, and not a generic outdent and indent pattern </del> <ins> // https://github.com/microsoft/vscode/issues/208215 </ins> const model = createTextModel([ <del> 'const add1 = (n) =>', '    console.log("hi");', </del> <ins> 'const array = [1, 2, 3, 4, 5];', 'array.map(', '    v =>', </ins> ].join('n'), languageId, {}); disposables.add(model); withTestCodeEditor(model, { autoIndent: "full" }, (editor, viewModel, instantiationService) => { registerLanguage(instantiationService, languageId, Language.TypeScript, disposables); <del> editor.setSelection(new Selection(2, 24, 2, 24)); </del> <ins> editor.setSelection(new Selection(3, 9, 3, 9)); </ins> viewModel.type("n", 'keyboard'); assert.strictEqual(model.getValue(), [ <del> 'const add1 = (n) =>', '    console.log("hi");', '', </del> <ins> 'const array = [1, 2, 3, 4, 5];', 'array.map(', '    v =>', '        ' </ins> ].join('n')); }); }); <del> test.skip('issue #116843: indent after arrow function', () => { </del> <ins> test('issue #116843: indent after arrow function', () => { </ins> // https://github.com/microsoft/vscode/issues/116843

decreaseIndentPattern: /^((?!.*?/*).**/)?s*[}]].*$/, increaseIndentPattern: /^((?!//).)*({([^}"'`]*|(t|[ ])*//.*)|([^)"'`]*|[[^]"'`]*)$/, // e.g.  * ...| or */| or *-----*/| <del> unIndentedLinePattern: /^(t|[ ])*[ ]*[^/]**/s*$|^(t|[ ])*[ ]*/s*$|^(t|[ ])*[ ]*([ ]([^*]|*(?!/))*)?$/ </del> <ins> unIndentedLinePattern: /^(t|[ ])*[ ]*[^/]**/s*$|^(t|[ ])*[ ]*/s*$|^(t|[ ])*[ ]*([ ]([^*]|*(?!/))*)?$/, indentNextLinePattern: /^.*=>s*$/, </ins> };