Is there a way to use the clang formatter with NetBeans 8.1? I'm running NetBeans on Arch Linux, if it matters.
1 Answers
At the time you posted your question the answer was no, but now (over a year later!) you can use the clang formatter in NetBeans, subject to the following constraints:
You must use version 8.2 of NetBeans rather than version 8.1.
You must install from a recent nightly development build of NetBeans 8.2 rather than using the standard release. That's because this functionality was only added recently. See NetBeans bug 270882.
To use the clang formatter in NetBeans:
Create a trivial C++ application in NetBeans.
Select its project node in the Projects tab, right click, and select Properties from the popup menu.
In the Project Properties window that opens click Formatting in the list of categories.
On the right side of the screen there is a new radio button named Use clang-format. Click that, and you can then either use a predefined style, or supply your own customized format file, as shown in the screen shot below.

- 16,436
- 7
- 61
- 102