Then configure in your IntelliJ/Webstorm
File -> Settings -> Tools -> clang-format
clang format binary -> Point it to the binary installed by npm
C:\Users\Your User Name\AppData\Roaming\npm\node_modules\clang-format\bin\win32\clang-format.exe
If you have a project specific .clang-format file paste the absolute path into PATH in settings
Also, you can right click on your local .clang-format file -> Associate with file type -> YAML
The clang-format options are documented here
There is also an interactive clang-format tool here
Configuration with IntelliJ is not documented very well.
This is what I have found to work with system Windows 10, Webstorm 2018.1.2, NodeJS 8.11.1, npm 6.0.0
Perform an npm install of clang-format global, or inside a project if preffered.
npm install clang-format -g
Install IntelliJ/Webstorm plugin ClangFormatIJ File -> Settings -> Plugins -> Browse repositories -> search clang format
Then configure in your IntelliJ/Webstorm File -> Settings -> Tools -> clang-format clang format binary -> Point it to the binary installed by npm
C:\Users\Your User Name\AppData\Roaming\npm\node_modules\clang-format\bin\win32\clang-format.exe
If you have a project specific .clang-format file paste the absolute path into PATH in settings Also, you can right click on your local .clang-format file -> Associate with file type -> YAML The clang-format options are documented here There is also an interactive clang-format tool here