...
Install docker. For Mac and Windows, you must install docker desktop instead.
If using Windows follow two more steps because Docker for Windows runs on WSL (Windows Subsystem for Linux):
Install WSL by running
wsl --install
Setup wsl by launching ubuntu from the start menu
Setup the formatter:
Open (File-->Preferences-->Settings)
Type clang in the settings search bar
Change
C_Cpp: Clang_format_fallback Style
tonone
Change
C_Cpp: Clang_format_style
tofile:${workspaceRoot}/Drivers/Embedded-Base/clang-format
Now you are ready to format the files using the builtin vscode shortcut (right click in the editor and hit format)
Note: Never format files touched by CubeMX. This includes any files listed as autogenerated, including files you may need to edit like main.c or stm32XXX_it.c!!!
...