How to change the brace/indentation style for auto-format?

Apologies if this is the wrong place for this.

Ever since Processing changed to 2, the indentations and curly braces have not worked very well to cover different styles, when using auto-format to fix the code.

https://en.wikipedia.org/wiki/Indentation_style

As a comparison, Arduino IDE uses .clang-format file which allows changing indentation behaviour. Is there a way to do a similar change in Processing?

If not, then my humble and kind request is please please add that.

Hello @kryt,

I don’t have a solution for Processing…

Consider alternative editors such as VSCode.

I added this to VSCode and able to use the indentation style that I prefer to use for my personal coding:

The extension used this:
https://astyle.sourceforge.net/

The above can be a challenge!
The takeaway from this should be explore alternative editors and find a solution that best suits your needs.

I have not yet tried this (using another Processing extension… explore what is available):

:)

Thank you for the suggestion, @glv.

If there is no way to change it, then I think I’ll stick to processing IDE for now, for this purpose.

Personally I write larger Java projects (that have processing in the background) using Sublime Text, which is pretty good and modifiable. It’s just that I teach using processing, and I can’t waste extra time having students setup another system. Processing itself is good enough and stable enough to run on pc/mac, and as a teacher, that’s one less thing to worry about.

I’m actually surprised if there’s no way to modify the brace/indentation style, since e.g. tabs can be set. While I am sure this is already being discussed or thought about, do you by any chance know where one might put suggestions for developing processing further? I tried to look for that from the processing-, foundation-, and discourse-websites, but could not find it.

1 Like

Look for Contribute here:

This is a good place to start:

:)