VS Code配置:settings.json
json
适用于现代 C++ 的 JSON。
项目地址:https://gitcode.com/gh_mirrors/js/json
![](https://devpress.csdnimg.cn/6deffb34f7114cc1a2e1e686a67e0027.png)
·
vscode提供了两种设置方式:用户设置和工作区设置
用户设置:这种设置方式,会应用于该用户打开的所有工程
工作区设置:工作区是指使用vscode打开的某个文件夹,在该文件夹下会创建一个名为.vscode的隐藏文件夹,里面包含着仅适用于当前目录的vscode的设置,工作区的设置会覆盖用户设置
每个人都有自己的偏好,在使用vscode进行开发时,都会根据自己的习惯来对vscode进行用户级别的配置。
但是当多人共同完成某个项目的时候,该项目会有一定的编码规范,如: 编辑某个语言时的设置,代码的缩进等等,这个时候就需要对该项目进行单独的工作区级别的设置
settings.json说明
{
"editor.tabSize": 2,
"editor.formatOnSave": true,
"files.encoding": "utf8",
"files.eol": "\n",
"files.exclude": {
"**/node_modules": true,
"**/dist": true,
"**/.*": true,
"babel.config.js": true,
"jsconfig.json": true,
"postcss.config.js": true,
"yarn.lock": true,
"LICENSE": true,
"test/**": true,
"docs/**": true
},
"html.format.endWithNewline": true,
"html.format.indentHandlebars": true,
"html.format.indentInnerHtml": true,
"html.format.wrapAttributes": "force-aligned",
"less.lint.duplicateProperties": "warning",
"less.lint.idSelector": "warning",
"less.lint.zeroUnits": "warning",
"psi-header.variables": [
[
"projectname",
"Demo"
]
],
"psi-header.config": {
"forceToTop": true,
"blankLinesAfter": 1,
"license": "MIT"
},
"psi-header.changes-tracking": {
"isActive": true,
"autoHeader": "autoSave",
"include": [
"vue",
"js",
"javascript",
"less",
"scss",
"yml",
"yaml"
],
"exclude": [
"markdown",
"md",
"gql",
"graphql"
],
"excludeGlob": [
"dist/**"
]
},
"psi-header.lang-config": [
{
"language": "html",
"begin": "<!--",
"end": "-->",
"prefix": " "
},
{
"language": "javascript",
"begin": "/*",
"end": " */",
"prefix": " * "
},
{
"language": "yaml",
"begin": "#",
"end": "#",
"prefix": "# "
},
{
"language": "js",
"mapTo": "javascript"
},
{
"language": "vue",
"mapTo": "html"
},
{
"language": "scss",
"mapTo": "javascript"
},
{
"language": "less",
"mapTo": "javascript"
},
{
"language": "ts",
"mapTo": "javascript"
},
{
"language": "typescript",
"mapTo": "javascript"
},
{
"language": "yml",
"mapTo": "yaml"
},
{
"language": "dotenv",
"mapTo": "yaml"
}
],
"psi-header.templates": [
{
"language": "*",
"template": [
"FilePath: <<filerelativepath>>",
"Project: <<projectname>>",
"CreatedAt: <<filecreated('YYYY-MM-DD HH:mm:ss')>>",
"Last Modified: <<dateformat('YYYY-MM-DD HH:mm:ss')>>",
"CreatedBy: <<initials>> (<<<authorEmail>>>)",
"Copyright: (c) <<year>>",
"Write a description of the code here"
]
}
],
"vetur.validation.template": false,
"vetur.format.defaultFormatter.html": "prettyhtml",
"vetur.format.defaultFormatter.css": "prettier",
"vetur.format.defaultFormatter.postcss": "prettier",
"vetur.format.defaultFormatter.scss": "prettier",
"vetur.format.defaultFormatter.less": "prettier",
"vetur.format.defaultFormatter.stylus": "stylus-supremacy",
"vetur.format.defaultFormatter.js": "prettier",
"vetur.format.defaultFormatter.ts": "prettier",
"vetur.format.options.tabSize": 2,
"vetur.format.options.useTabs": false,
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "force-aligned"
},
"prettyhtml": {
"printWidth": 80,
"singleQuote": false,
"wrapAttributes": true,
"sortAttributes": true,
"tabWidth": 2,
"useTabs": false
},
"prettier": {
"semi": false,
"singleQuote": true
}
},
"eslint.packageManager": "yarn",
"todohighlight.include": [
"**/*.js",
"**/*.html",
"**/*.css",
"**/*.vue",
"**/*.less",
"**/*.markdown",
"**/*.md",
"**/*.graphql",
"**/*.gql"
],
"npm.packageManager": "yarn",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
![]( https://profile-avatar.csdnimg.cn/default.jpg)
![](https://devpress.csdnimg.cn/7174e1ca86c447029bb12f9ec0bd281c.png)
![](https://devpress.csdnimg.cn/096f7827187446559bd7b6030eb5db38.png)
![](https://devpress.csdnimg.cn/6deffb34f7114cc1a2e1e686a67e0027.png)
适用于现代 C++ 的 JSON。
最近提交(Master分支:4 个月前 )
f06604fc
* :page_facing_up: bump the copyright years
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
* :page_facing_up: bump the copyright years
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
* :page_facing_up: bump the copyright years
Signed-off-by: Niels Lohmann <niels.lohmann@gmail.com>
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
Signed-off-by: Niels Lohmann <niels.lohmann@gmail.com> 1 个月前
d23291ba
* add a ci step for Json_Diagnostic_Positions
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
* Update ci.cmake to address review comments
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
* address review comment
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
* fix typo in the comment
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
* fix typos in ci.cmake
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
* invoke the new ci step from ubuntu.yml
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
* issue4561 - use diagnostic positions for exceptions
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
* fix ci_test_documentation check
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
* address review comments
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
* fix ci check failures for unit-diagnostic-postions.cpp
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
* improvements based on review comments
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
* fix const correctness string
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
* further refinements based on reviews
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
* add one more test case for full coverage
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
* ci check fix - add const
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
* add unit tests for json_diagnostic_postions only
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
* fix ci_test_diagnostics
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
* fix ci_test_build_documentation check
Signed-off-by: Harinath Nampally <harinath922@gmail.com>
---------
Signed-off-by: Harinath Nampally <harinath922@gmail.com> 1 个月前
更多推荐
所有评论(0)