clang-format-usage-in-vscode
install clang-format
1 | pip3 install clang-format |
Thus, it would be install in $HOME/.local/bin/clang-format
generate .clang-format file
1 | clang-format --style=Google --dump-config > .clang-format |
copy to your project
copy .clang-format
to your project’s top directory
vscode settings
vscode install this extension: xaver.Clang-Format
open settings.json
and add
1 | { |
unsatisfy with google style?
change .clang-format
by yourself: options