Clang-Format Indent 4 for VS CodeCode FormatterUse clang-format to format your C/C++/Java/JavaScript/Objective-C/Objective-C++/Protobuf with indentations of 4 spaces like the following:
AcknowledgementThe extension is forked from Xaver Hellauer's Repo and modified to use clang-format with indent 4. More usage details can be found in the original repo. UsageInstall clang-format use one of the following methods:
Obtain the absolute path to clang-format:
Add the following to your vscode
To automatically format a file on save, add the following to your vscode
If you want to use a specific clang-format config file, add the following to your vscode
Clang-FormatClang-Format is a tool to format C/C++/Java/JavaScript/Objective-C/Objective-C++/Protobuf code. It can be configured with a config file named Source codeAvailable on github: https://github.com/demiaochen/vscode-clang-format-indent-4 |