当前位置:网站首页>Vscade setting clang format

Vscade setting clang format

2022-06-25 04:42:00 Taylor lance

User settings and workspace settings
VS Code Two settings are provided :

  • User Settings : This way of setting , Will be applied to all projects opened by the user ;
  • Workspace settings : Workspace is the use of VS Code Open a folder , Under this folder, a file named .vscode Hidden folders for , It contains... That only applies to the current directory VS Code Set up , Workspace settings override the user's settings .

Everyone has their own preferences , In the use of VS Code In development , Will be according to their own habits to VS Code User level configuration .
But when many people work together on a project , The project will have some coding specifications , Such as : Settings when editing a language , Code indentation, etc , At this time, you need to set up a separate workspace level for the project .

Now let's set up a workspace ( There is a folder under the code folder .vscode Folder , There's a settings.json file )

1、 open VScode Of setting
 Insert picture description here
2、 Start when setting is saved format
 Insert picture description here
3、 Set up clang-format Address , as well as format The path of .
 Insert picture description here
Notice above Assume Name The path is under your own code folder .clang-format file , How to generate this file please Baidu .

原网站

版权声明
本文为[Taylor lance]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206250311585369.html