-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arrow function indenting curly braces when starting next line #216737
Comments
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.90.2. Please try upgrading to the latest version and checking whether this issue remains. Happy Coding! |
Hi, yes the issue still remains now that I'm on the latest version |
This is happening for me in TypeScript files after |
Hi thank you for posting this issue @djoodew . So from what I understood, you mean the issue is that the next line should not be indented after an arrow of an arrow function? So a fix has been merged recently to outdent the next line if an opening curly brace is type. The fix is in the latest Insiders release and should be in the next stable release. The new behavior would be as follows: Screen.Recording.2024-06-25.at.09.24.13.movHi @KyleKolander thank you for the comment. I suppose you are talking about braceless if statements. This change came from the issue #43244 which amassed 44 votes. As in the case above, the next line is outdent is an opening curly brace is typed: Screen.Recording.2024-06-25.at.09.26.24.mov |
I am, and I left a comment there. This is terrible. You guys need to fix this. People expect the standard behavior. Very confusing and frustrating. I'm shocked... |
The behavior we have introduced is the same as in certain other editors. As I mentioned when you type an opening curly brace the line is now outdented, so you end up with the following sequence of code:
What indentation behavior would you expect? |
Hi @KyleKolander yes like I said previously in my message in the other thread which you commented on, you do not see the fix and the correct behavior yet because you are on the latest stable VS Code release, and the fix is not there yet. To see the fix you have to wait until the next stable release which should come out this week or next week. You can also see the fix already now in the Insiders VS Code release which comes out every single day and can be downloaded here: https://code.visualstudio.com/insiders/. |
Hi I believe this issue is fixed. Closing. |
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
Screen.Recording.2024-06-20.at.10.01.28.AM.mov
The text was updated successfully, but these errors were encountered: