Is it possible to change code formatting to Allman bracing in CSS & JS? (answered)

As the title says, I cannot (and will not) mentally adjust to 1TBS style as it’s awful and stupid IMHO.

Please tell me how I can change Pinegrows code windows to stop removing my Allman bracing and shoving 1TBS down my throat every time I open the windows… please?

Pinegrow doesn’t give you any options to change code formatting styles. Its HTML gets auto-formatted or not (depending of the settings) according to its built-in rules, and there is no way to switch between different brace styles.

There’s also an option for CSS formatting (maybe auto-detect will work?)

This is not something that is planned for development right now.

If code formatting is really important to your workflow, you could use an external editor for manual code work and keep Pinegrow for the visual side.

We hear you on the preference though. If more users request this kind of feature it could be looked at down the road.

1 Like

I wouldn’t go as far as saying the other formatting is “awful and stupid”. However, I would confess that personally I have difficulty following blocks of code where opening and closing braces are in different columns.

I always switch my code to Allman (whether HTML or programming) so would vote for an option for Pinegrow to do it automatically.

As a workaround, following on from what @Emmanuel said, if you have Pinegrow connected to Visual Studio Code, there’s an extension called “SCSS Allman formatter” which should do the trick. I wasn’t aware of it until I read Emmanuel’s reply and decided to see if there was something around.

Unfortunately, I’m a bit of a novice at VSC so still figuring out how to get the extension to perform its magic. If it does, it should be what we are both looking for.

1 Like

Great stuff, thanks @reflex I’ll check that out.