EDK II Code Formatting
- Install the Uncrustify VS Code extension: Search Uncrustify in VS Code Marketplace and Install it
-
Extract uncrustify.exe and uncrustify.cfg to C:\Uncrustify
-
Configure the Uncrustify plugin for your local setup by adding the following to your VS Code
"uncrustify.configPath.windows": "C:/Uncrustify/uncrustify.cfg",
"uncrustify.executablePath.windows": "C:/Uncrustify/uncrustify.exe"
-
Open a C source code file, Ctrl+Shift+P -> Format Document With… -> Configure Default Formatter -> Uncrustify
-
Then, Ctrl+Shift+P -> Format Document any time you would like to format your source code file with Uncrustify