【VSCode】The ‘clang-format‘ command is not available.

Windows

去安装LLVM,并将其添加到环境变量中
官网:LLVM

Linux

去安装clang-format

sudo apt update
sudo apt install clang-format --yes

补充

如果你使用了Microsoft开发的C/C++扩展,那其实不需要专门去配置一个clang-format,因为C/C++扩展默认使用clang-format来格式化代码。

猜你喜欢

转载自blog.csdn.net/qq_37435462/article/details/128450312