VsCode-setting.json用户配置
Posted JackieDYH
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了VsCode-setting.json用户配置相关的知识,希望对你有一定的参考价值。
安装vsCode prettier插件
管理->设置
setting.json
是自己情况使用下列两个其中一个,可修改对应参数
"workbench.iconTheme": "vscode-icons",
"workbench.startupEditor": "newUntitledFile",
"emmet.triggerExpansionOnTab": true,
"emmet.showAbbreviationSuggestions": true,
"emmet.includeLanguages":
"javascript": "javascriptreact",
"vue-html": "html",
"vue": "html",
"wxml": "html"
,
"debug.console.fontSize": 20,
"editor.fontSize": 20,
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active",
"javascript.format.semicolons": "insert",
"prettier.trailingComma": "none",
"prettier.singleQuote": true,
"prettier.semi": true,
"fileheader.customMade":
"Author": "Jackie",
"Date": "Do not edit",
"LastEditTime": "Do not edit",
"LastEditors": "Jackie",
"Description": "file content",
"FilePath": "Do not edit",
"version": ""
,
"fileheader.cursorMode":
"description": "",
"param": "params",
"return": ""
,
"fileheader.configObj":
"createFileTime": true,
"language":
"languagetest":
"head": "/$$",
"middle": " $ @",
"end": " $/"
,
"autoAdd": true,
"autoAddLine": 100,
"autoAlready": true,
"annotationStr":
"head": "/*",
"middle": " * @",
"end": " */",
"use": false
,
"headInsertLine":
"php": 2,
"sh": 2
,
"beforeAnnotation":
"文件后缀": "该文件后缀的头部注释之前添加某些内容"
,
"afterAnnotation":
"文件后缀": "该文件后缀的头部注释之后添加某些内容"
,
"specialOptions":
"特殊字段": "自定义比如LastEditTime/LastEditors"
,
"switch":
"newlineAddAnnotation": true
,
"supportAutoLanguage": [],
"prohibitAutoAdd": ["json", "md", "html"],
"folderBlacklist": ["node_modules", "文件夹禁止自动添加头部注释"],
"prohibitItemAutoAdd": [
"项目的全称, 整个项目禁止自动添加头部注释, 可以使用快捷键添加"
],
"moveCursor": true,
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"atSymbol": ["@", "@"],
"atSymbolObj":
"文件后缀": ["头部注释@符号", "函数注释@符号"]
,
"colon": [": ", ": "],
"colonObj":
"文件后缀": ["头部注释冒号", "函数注释冒号"]
,
"filePathColon": "/",
"showErrorMessage": false,
"writeLog": false,
"wideSame": false,
"wideNum": 13,
"functionWideNum": 0,
"CheckFileChange": false,
"createHeader": true,
"useWorker": false,
"designAddHead": false,
"headDesignName": "random",
"headDesign": false,
"cursorModeInternal": false,
"openFunctionParamsCheck": true
,
"vsicons.dontShowNewVersionMessage": true,
"[vue]":
"editor.defaultFormatter": "octref.vetur"
,
"editor.wordWrap": "on",
"vetur.format.defaultFormatterOptions":
"js-beautify-html":
"wrap_attributes": "force-expand-multiline"
,
"prettyhtml":
"printWidth": 100,
"singleQuote": false,
"wrapAttributes": false,
"sortAttributes": false
,
"[javascript]":
"editor.defaultFormatter": "vscode.typescript-language-features"
,
"[html]":
"editor.defaultFormatter": "vscode.html-language-features"
,
"[json]":
"editor.defaultFormatter": "vscode.json-language-features"
,
"editor.formatOnSave": true,
"i18n-ally.displayLanguage": "cn",
"git.autoStash": true,
"git.rebaseWhenSync": true,
"git.autofetch": true,
"leetcode.endpoint": "leetcode-cn",
"diffEditor.ignoreTrimWhitespace": false,
"[typescriptreact]":
"editor.defaultFormatter": "esbenp.prettier-vscode"
,
"[typescript]":
"editor.defaultFormatter": "esbenp.prettier-vscode"
,
"winopacity.opacity": 240,
"better-comments.tags": [
"tag": "!",
"color": "#FF2D00",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
,
"tag": "?",
"color": "#3498DB",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
,
"tag": "//",
"color": "#474747",
"strikethrough": true,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
,
"tag": "todo",
"color": "#FF8C00",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
,
"tag": "*",
"color": "#98C379",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
],
"template-string-converter.validLanguages": [
"vue",
"svelte",
"typescript",
"javascript",
"typescriptreact",
"javascriptreact"
],
"auto-rename-tag.activationOnLanguage": [
"html",
"xml",
"php",
"vue",
"javascript"
],
"tabnine.experimentalAutoImports": true,
"projectManager.git.baseFolders": [],
"files.eol": "\\n",
"github.copilot.enable":
"*": true,
"yaml": false,
"plaintext": false,
"markdown": false,
"vue": true
,
"editor.inlineSuggest.enabled": true
"git.enableSmartCommit": true,
// 修改注释颜色
"editor.tokenColorCustomizations":
"comments":
"fontStyle": "bold",
"foreground": "#82e0aa"
,
// 配置文件类型识别
"files.associations":
"*.js": "javascript",
"*.json": "jsonc",
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript"
,
"extensions.ignoreRecommendations": false,
"files.exclude":
"**/.DS_Store": true,
"**/.git": true,
"**/.hg": true,
"**/.svn": true,
"**/CVS": true,
"**/node_modules": false,
"**/tmp": true
,
// "javascript.implicitProjectConfig.experimentalDecorators": true,
"explorer.confirmDragAndDrop": false,
"typescript.updateImportsOnFileMove.enabled": "prompt",
"git.confirmSync": false,
"editor.tabSize": 2,
"editor.fontWeight": "500",
"[json]": ,
"editor.tabCompletion": "on",
"vsicons.projectDetection.autoReload": true,
"editor.fontFamily": "Monaco, 'Courier New', monospace, Meslo LG M for Powerline",
"[html]":
"editor.defaultFormatter": "vscode.html-language-features"
,
"editor.fontSize": 16,
"debug.console.fontSize": 14,
"vsicons.dontShowNewVersionMessage": true,
"editor.minimap.enabled": true,
"emmet.extensionsPath": [
""
],
// vue eslint start 保存时自动格式化代码
"editor.formatOnSave": true,
// eslint配置项,保存时自动修复错误
"editor.codeActionsOnSave":
"source.fixAll": true
,
"vetur.ignoreProjectWarning": true,
// 让vetur使用vs自带的js格式化工具
// uni-app和vue 项目使用
"vetur.format.defaultFormatter.js": "vscode-typescript",
"javascript.format.semicolons": "remove",
// // 指定 *.vue 文件的格式化工具为vetur
"[vue]":
"editor.defaultFormatter": "octref.vetur"
,
// // 指定 *.js 文件的格式化工具为vscode自带
"[javascript]":
"editor.defaultFormatter": "vscode.typescript-language-features"
,
// // 默认使用prettier格式化支持的文件
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.jsxBracketSameLine": true,
// 函数前面加个空格
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"prettier.singleQuote": true,
"prettier.semi": false,
// eslint end
// react
// 当按tab键的时候,会自动提示
"emmet.triggerExpansionOnTab": true,
"emmet.showAbbreviationSuggestions": true,
"emmet.includeLanguages":
// jsx的提示
"javascript": "javascriptreact",
"vue-html": "html",
"vue": "html",
"wxml": "html"
,
// end
"[jsonc]":
"editor.defaultFormatter": "vscode.json-language-features"
,
// @路径提示
"path-intellisense.mappings":
"@": "$workspaceRoot/src"
,
"security.workspace.trust.untrustedFiles": "open",
"git.ignoreMissingGitWarning": true,
"window.zoomLevel": 1
以上是关于VsCode-setting.json用户配置的主要内容,如果未能解决你的问题,请参考以下文章