Nuklear icon indicating copy to clipboard operation
Nuklear copied to clipboard

clang-format config

Open PROP65 opened this issue 1 year ago • 1 comments

clang-format does not have the most granular configuration so some things (like different pointer placement on unnamed arguments in function prototypes) are not currently achievable.

From the tinkering I've done with it so far it seems that formatting before building yields better results. If formatting is done on the final header file all preprocessor directives will be further indented.

Major changes compared to current styling:

  • preprocessor directive indentation
  • max line length of 160

I'm open to changing the current config if needed, I'll admit it's far from perfect.

If needed I can format the src folder and rebuild once the style config is agreed on.

Here's nuklear.h after formatting and rebuilding with this change https://gist.github.com/PROP65/bf35c5a22a210584d5057fb2b6a1323d

PROP65 avatar Feb 10 '25 00:02 PROP65

#739

PROP65 avatar Feb 10 '25 00:02 PROP65