Vscode can’t format code using the official C / C + + plug-in

Time:2021-2-27

The official C / C + + plug-in supports the use of. Clang format configuration file for custom style code formatting, without additional installationclang-formatplug-in unit.
However, there are some small problems when using the default configuration file exported by clang format – style = llvm – dump config >. Clang format to format. As shown in the picture

在这里插入图片描述

According to the prompt in the output window, an unrecognized key appears on line 94

在这里插入图片描述

take.clang-formatAdd comments to the code in lines 93-96 of

在这里插入图片描述

As for why, I think the official plug-in does not support rawstring formats. Some children asked what this thing is. Please see the official document of clang:
Clang 11 documentation

summary

Here is the article about the problem that vscode can’t format code using the official C / C + + plug-in. For more content about vscode C + + code formatting, please search previous articles of developer or continue to browse the following related articles. I hope you can support developer more in the future!