-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Fix single line if/else and loop indentation for Typescript and PHP #136577
Conversation
d021de1
to
16f501e
Compare
I rebased this to fix a merge conflict. It's a fairly simple change that would solve a pretty annoying daily issue. It would be great if this could get merged. |
@rebornix, is there anything else I need to do to get this PR merged or is it just waiting on someone to have time to review it? |
@hediet, if you could look at this one, I'd really appreciate it. Basically, it adds a deindent after single line code for PHP/TS/JS. For example, if you put your cursor where the if (1)
1;| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add C/C++ languages support to this PR also?
I updated it to include C/C++. |
Thank you, @hediet and @TylerLeonhardt! |
This PR addresses #43244. It does not solve the all the issues in there. In particular, while I like single line
if
statements without brackets, I don't want VS Code to assume all myif
statements are going to be a single line for 2 reasons:if
versus having to hit backspace if it were to assume it's going to be one line.Here are the parts addresses:
ENTER
after a single lineif
.Below are some sample files to test with.
Typescript
PHP