Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

[request] Code style: can format cascade transformations #92

Closed
danielsan80 opened this issue Jan 2, 2022 · 1 comment
Closed

[request] Code style: can format cascade transformations #92

danielsan80 opened this issue Jan 2, 2022 · 1 comment

Comments

@danielsan80
Copy link

danielsan80 commented Jan 2, 2022

I'd like to set a formatting preference on cascade transformations.

Generally I use this style:

render()
color("red")
rotate([0,45,0])
translate([20,20,20])
cube([10,10,10])

color("green")
translate([10,10,10]
sphere(r=10);

becaouse is more readable (for me) in the native editor.

BUT the autoformatter applies this style:

render()
   color("red")
      rotate([0,45,0])
         translate([20,20,20])
            cube([10,10,10])

color("green")
   translate([10,10,10]
      sphere(r=10);

that is nicer in PhpStorm but less readable in the native editor.

@ldenisey
Copy link
Collaborator

Added a field "Indent cascading transformations" in Settings menu -> Editor -> Code style -> OpenSCAD -> Tabs and Indents.
Capture d’écran 2022-07-25 120646
Capture d’écran 2022-07-25 120715

Will be released in version 2.2.0 coming soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants