-
Notifications
You must be signed in to change notification settings - Fork 32.8k
'reindent all lines' and formatter have different formatting strategies #19140
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
Comments
This is because that our indentation rules for TypeScript is not complete, the one we are using is
The one TextMate or other editors are using is like
But we still have good experience with TypeScript as we allow extensions to customize Right now I suggest to make ReIndent Lines honor onEnterRules and remove unnecessary onEnterRules from TypeScript. cc @mjbvz . Since it's kind of breaking change I'd like to postpone it to following iteration and work together with Matt. |
A |
Other issues have been closed in favor of this one, but this issue has gone stale. Could you give us an update? |
Changing switch/case indentation for the JS/ts formatter is tracked by microsoft/TypeScript#18682 |
This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider. If you wonder what we are up to, please see our roadmap and issue reporting guidelines. Thanks for your understanding and happy coding! |
Why was this issue closed and points to an issue about switch/case indentation specifically. This is an issue that effects more than just switch. Jsdoc comments are formatted differently by reindent lines vs format, as well as jsx. I expect all indentation commands to indent the same |
There is pretty much zero reason to use |
So, every couple of months I keep coming back to vscode hoping to be able to use it. There is a lot to like with vscode. However, the one thing that keeps getting to me is how indentation works. I stumbled back upon this issue I commented on a couple of months ago. While I agree Let me explain where I'm coming from on this. I am an avid emacs user, and in emacs the tab key will auto indent the current line. I changed my tab key in my vscode config to execute |
my fault, it looks like |
Uh oh!
There was an error while loading. Please reload this page.
Testing #19091
In a typescript file:
It would be better if formatter and the reindent command use the same indentation strategy.
The text was updated successfully, but these errors were encountered: