-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixedVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
Description
Most of the time, it's needed to format some part of code manually by developers to align the code vertically.
For example: in the following code that is formatted by typescript formatter,
constructor (public http: Http, public chd: ChangeDetectorRef) {
this.ctx.customer_exp = { sel: { "new0.customer": "id" } };
this.ctx.perso_exp = { sel: { "new0.perso": "id" } };
this.ctx.car_exp = { sel: { "new0.car": "id" } };
}
I changed format of some part to improve readability of the formatted code, After changing the code is like this
constructor (public http: Http, public chd: ChangeDetectorRef) {
this.ctx.customer_exp = {sel: { "new0.customer": "id" }};
this.ctx.perso_exp = {sel: { "new0.perso" : "id" }};
this.ctx.car_exp = {sel: { "new0.car" : "id" }};
}
It would be nice, typescript formatter remember code that manually formatted part and protect them.
According to my opinion if this is possible, no longer needed to align colons automatically.
In connection with this property, following value can be added to settings file.
typescript.format.rememberManuallyFormattedCodePart = true;
Otherwise to find a common solution that will be a solution for everyone is very difficult.
Metadata
Metadata
Assignees
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixedVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue