While working on adding support for the improved auto-indent mentioned here to the Haxe extension, I noticed it doesn't work well with Allman bracket style ({ in new line). This is the behavior for both TS and JS:

The expected behavior would be to un-indent again when the { is typed, take Sublime for example:

The Reindent lines command also produces incorrect indentation for lines that are already typed:

@Gama11 We added indentNextLinePattern: /^\s*(for|while|if|else)\b(?!.*[;{}]\s*(\/\/.*|\/[*].*[*]\/\s*)?$)/ which means anyline matches such rule will only indent next line. Then we can support below case in JavaScript
if (true)
if (true)
if (true)
console.log('a')
console.log('b')
If you want to have Allman bracket style support in an extension, you may want to remove this case from indentNextLinePattern rule.
The reindent one is a bug.
@rebornix It seems it should be possible to support both. You'd have to remove the indent from indentNextLinePattern again when a { is typed in a new line, like Sublime does in the .gif I included. IntelliJ also handles this well:

@Gama11 I reconsidered it, it's a valid feature request :) Thanks for all the info.
@rebornix Thanks! This is probably not much of an issue for TS / JS, but for other C-Style languages (Java, C#...), Allman Style is fairly common.
Please fix: VSCode was a great editor until this bug slipped in; this may seem like a minor thing, but it's really not...
Quicky fix hack seems to work: (on Mac) edit the file "~/Applications/Visual Studio Code.app//Contents/Resources/app/extensions/typescript/out/typescriptMain.js", comment out these two lines:
//increaseIndentPattern: /^.*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/,
//indentNextLinePattern: /^\s*(for|while|if|else)\b(?!.*[;{}]\s*(\/\/.*|\/[*].*[*]\/\s*)?$)/
A semblance of sanity appears to be restored.
Thanks all. It worked for me. I commented thw two lines of code and the indent is as previous version.
@rebornix Missing editor-indentation label? :)
_just_ got 1.15 update... unfortunately this bug is still there...
The editor is barely usable with this bug! Can we boost priority on this somehow?
I'll try @aclarkxyz hack for now
Also this issue is wrongly marked as "Feature Request".
This is a regression bug, not a feature request.
definitely a regression bug, I'm am seeing this break formats on paste too. Used to work beautifully.
I'm seeing this bug on cpp files. Same issue as described by op. Any fix inbound, or a workaround in the meantime?
fyi setting increaseIndentPattern and decreaseIndentPattern to "" in language-configuration.json for cpp and setting "editor.autoindent" to true restored the pre-1.14 behavior. This is the desired behavior.
@Gama11 for this particular issue, we already removed indentation rules for Allman bracket style, then now pressing enter after ) will not add indentation.
Feel free to open new issues for other unexpected behaviors, or you can disable the auto-indent by editor.autoIndent as one set of indentation rules won't work for everyone.
So there's no plans for getting auto-indentation on par with Sublime's / IntelliJ's behavior shown in the .gifs? Just removing the feature altogether (for this case) doesn't seem like a great solution...
Most helpful comment
Please fix: VSCode was a great editor until this bug slipped in; this may seem like a minor thing, but it's really not...