An extension for Visual Studio 2022 to format C/C++ documents using Artistic Style engine.
Based on (and uses code snippets from): astyle-extension by lukamicoder
More info on Artistic Style at http://astyle.sourceforge.net/
Supported Visual Studio editions:
Visual Studio 2022 Community
Visual Studio 2022 Professional
Visual Studio 2022 Enterprise
Features:
- Ability to set astyle arguments
Tools -> Options -> BN_Astyle
- Optional automatic format on save
Tools -> Options -> BN_Astyle
- Command to format current C/C++ document
Edit -> Format Document (BN_Astyle)
- Download
BN_Astyle.zip
from Releases page - Unpack anywhere
- Double click
.vsix
to install. Visual Studio installer should guide you from there
- Check out the repository
- Open
BN_Astyle.sln
- Install any workloads Visual Studio prompts you to (.NET framework 4.8 and Extension SDK)
- Select
Release
/Any CPU
configuation - Build Solution
- If there were no issues, resulting
.vsix
should be inBN_Astyle\bin\Release
. Double click to install
- Go to
Tools -> Options -> BN_Astyle
- Enable automatic
Format on save
(or don't, depends on how you like it) - In BN repository, open
msvc-full-features\AStyleExtension-Cataclysm-DDA.cfg
with any text editor, copy contents ofCppCommandLine
entry and paste intoFormatting options
- Close options window by pressing
Ok
in bottom-right corner