DEV Community

Discussion on: Prettier and the Beauty of Opinionated Code Formatters

Collapse
 
eljayadobe profile image
Eljay-Adobe

There is a tool that we're using called clang-format. It does a respectable job at formatting. The problem isn't having a good formatting tool, the problem is reaching a consensus as to what the formatting should be.

All I know, it won't be my preferred formatting style. Because my C++ formatting style is very non-mainstream.

Thread Thread
 
fredericbonnet profile image
Frédéric Bonnet

Clang-format works great with VScode BTW. It's included in the standard C/C++ extension with sensible default settings although you can use your own or reuse popular styles (e.g. LLVM). I use it on all my projects and it made my life so much easier, formatting C code manually is such a PITA.