Eason Huang writes: > Hello Theodor and Emacs dev team, > > Recently I found that the indentation is broken in typescript-ts-mode > and tsx-ts-mode. When I press RET (M-x newline) after the ':' in the > case clause, it will always indent to the the same position of previouse line. > > For example: > In typescript-ts-mode and tsx-ts-mode will get this result as below: > > ``` > let day: number = 1; > > switch (day) { > case 0: > console.log("It is a Sunday."); > break; > case 1: > console.log("It is a Monday."); > break; > default: > console.log("No such day exists!"); > break; > } > ``` > expected: > > ``` > let day: number = 1; > > switch (day) { > case 0: > console.log("It is a Sunday."); > break; > case 1: > console.log("It is a Monday."); > break; > default: > console.log("No such day exists!"); > break; > } > ``` > > steps to reprodue: > > 1. start emacs with `emacs -Q` > 2. C-x C-f ~/test.tsx to open a test.tsx > 3. M-x typescript-ts-mode > 4. input the exmaple code mentioned above > 5. you will see the result. The following patch should fix this, Theo, WDYT? Yuan