I'm switching to visual studio 2017. The clang-format plugin does not seem to be compatible with this version yet.
Is there a way to force visual studio to use the old plugin anyway ? Is it compatible ?
Is there a not yet released version of the plugin that I can find somewhere or build myself ?
You can install clang-format and git-clang-format via npm install -g clang-format . To automatically format a file according to Electron C++ code style, run clang-format -i path/to/electron/file.cc . It should work on macOS/Linux/Windows.
clang-format is located in clang/tools/clang-format and can be used to format C/C++/Java/JavaScript/JSON/Objective-C/Protobuf/C# code.
Getting Started with Clang-Format If you want to use it on Windows, you need to use Alter+Shift+F. If you do not have Clang-Format installed on your system, you will see the prompt: The 'clang-format' command is not available.
I checked the clang mailing list and it looks like Hugo Puhlmann's already done the changes but hasn't submitted a patch yet:
Update: Just sent him a message on Twitter. He responded:
"I'll have a look at it today and submit an updated build, since there seems to be more interest on it."
Update (again): Hugo's posted a link to his build below.
Actually, you can
Now you have a clang-format extension installation package supports VS2017.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With