-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
formatter: allow custom switch-case indentation #18682
Comments
Hi guys, |
@andreineculau It has been almost half a year, is there any news on this? I suggest adding a setting (configurable in |
I have no news. Running with a disabled tsformatter. The issue is marked with "awaiting more feedback" but not sure from who. |
hi guys, how is the progress |
I guess this has a really low priority, as its annoying but not a big deal. Does anyone from the vscode have an expected release for this? |
This is really a severe issue for me using autoformat in VS Code, so I cannot use autoformat due to this bug. And for me, one of the main tasks of IDE is to do code autoformat. IMO it's a major failure of VS Code. All mature IDEs have configurable indentations. |
any good news? |
I'm also interested in the feature, to be able to configure the auto-indent for switchs/cases. I don't like the current behavior. Any news on this, please? |
any good news? very annoying issue |
this feature would be very helpful for my team! |
I kinda find flat annoying to eyes too so I prefer indented variant. |
There should be a setting for it. Shame that it hasn't been done yet. ESLint does it well. |
4 years later: |
cough |
4.5 years later: |
cough, cough |
I would be happy to look at a PR adding a formatter setting for this. Implementer be warned; our indenter code (“SmartIndenter” 🙄) is not the easiest to work with. |
Almost 5 years later, same issue no fix 🙄. |
Are you volunteering? All the other “N years” commenters have been pretty quiet since I marked it “Help Wanted.” I thought for sure somebody would have given this a shot by now. 😄 |
I'll have a try. |
@andrewbranch Needs help here. The code worked, but I'm not sure if there are more test cases that can be added. I don't really know what is behind the |
What is the equivalent setting for I have |
@a-pav I have created new issue for JavaScript microsoft/vscode#235085 Please, vote for it if it still affects you. |
TypeScript Version: 2.5.2
Code
Format the following
Expected behavior:
Keep it the same.
Actual behavior:
case
is indented.This becomes more problematic when used with tslint or javascript code with eslint, because on different systems we can see one winning over the other randomly i.e. sometimes the case is indented, sometimes it's not (eslint rule says do not indent).
The text was updated successfully, but these errors were encountered: