Opened 7 years ago

Closed 6 years ago

#662 closed Feature Requests (fixed)

2 small options for the code formatter

Reported by: zhil Owned by: scorphus
Priority: 1 Milestone: 1.2.0
Component: internal parser Version: 1.2.0-nightly
Keywords: code formatter Cc: mbowie

Description

After spending a lot of time on thinking about formatting style we have finally decided to use almost the same style you have by default in source code formatting.

But there is only 2 small changes, which is very unusual for me - spaces around concatenation operator
"asd" . "asd"
and spliting array items into new lines.

I have seen a ticket #116 about code formatting options, but assigned milestone 1.5.x is far away from today as I understand.

Is it possible to add 2 checkboxes which will deactivate this options? It would be really great :)

Attachments (2)

patch.txt (9.9 KB) - added by zhil 7 years ago.
662_zhil_contribution_extended.diff (10.1 KB) - added by scorphus 7 years ago.
Extends zhil's awesome contribution (kudos to zhil) by ommitting the blank space before the parenthesis when formatting a compact array definition. Maybe another option for "Omit parenthesis for array definition" might be a good idea (thanks to mbowie)

Download all attachments as: .zip

Change History (8)

comment:1 Changed 7 years ago by zhil

Actually I fixed it myself :)
patch attached

Changed 7 years ago by zhil

Changed 7 years ago by scorphus

Extends zhil's awesome contribution (kudos to zhil) by ommitting the blank space before the parenthesis when formatting a compact array definition. Maybe another option for "Omit parenthesis for array definition" might be a good idea (thanks to mbowie)

comment:2 Changed 6 years ago by scorphus

  • Owner set to scorphus
  • Status changed from new to assigned

comment:3 Changed 6 years ago by scorphus

  • Milestone set to 1.2.0
  • os_platform changed from Windows to Any

comment:4 Changed 6 years ago by mbowie

  • Cc mbowie added

comment:5 Changed 6 years ago by zhil

Can anybody please submit that changes?
It's done around a month ago and I would like to have ability to use it. :)

comment:6 Changed 6 years ago by scorphus

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [1551]) Adding two small options for code formatter (zhil's patch). These features are being added for 1.2.0, but in 1.3.0 this will not be present because the new formatter will allow people to build custom format rules. (fixes #662)

Note: See TracTickets for help on using tickets.