Windows
去安装LLVM,并将其添加到环境变量中
官网:LLVM
Linux
去安装clang-format
sudo apt update
sudo apt install clang-format --yes
补充
如果你使用了Microsoft开发的C/C++扩展,那其实不需要专门去配置一个clang-format,因为C/C++扩展默认使用clang-format来格式化代码。
去安装LLVM,并将其添加到环境变量中
官网:LLVM
去安装clang-format
sudo apt update
sudo apt install clang-format --yes
如果你使用了Microsoft开发的C/C++扩展,那其实不需要专门去配置一个clang-format,因为C/C++扩展默认使用clang-format来格式化代码。