logo头像
Snippet 博客主题

VSCode 配置

首选项配置

// 将设置放入此文件中以覆盖默认设置
{
// 一个制表符等于的空格数。该设置在 editor.detectIndentation 启用时根据文件内容进行重写。
“editor.tabSize”: 2,
// 控制字体系列。
“editor.fontFamily”: “Fira Code”,
“terminal.integrated.fontFamily”: “monospace”,
// 以像素为单位控制字号。
“editor.fontSize”: 16,
// 控制行高。使用 0 通过字号计算行高。
“editor.lineHeight”: 24,
// 控制折行方式。可以选择: - “off” (禁用折行), - “on” (视区折行), - “wordWrapColumn”(在“editor.wordWrapColumn”处折行)或 - “bounded”(在视区与“editor.wordWrapColumn”两者的较小者处折行)。
“editor.wordWrap”: “on”,
// 控制编辑器中呈现空白字符的方式,可能为“无”、“边界”和“全部”。“边界”选项不会在单词之间呈现单空格。
“editor.renderWhitespace”: “boundary”,
// 控制光标动画样式,可能的值为 “blink”、”smooth”、”phase”、”expand” 和 “solid”
“editor.cursorBlinking”: “smooth”,
// 控制编辑器是否应呈现缩进参考线
“editor.renderIndentGuides”: false,
// 控制是否将代码段与其他建议一起显示以及它们的排序方式。
“editor.snippetSuggestions”: “top”,
// 指定工作台中使用的颜色主题。
“workbench.colorTheme”: “One Dark Pro”,
// 指定在工作台中使用的图标主题。
“workbench.iconTheme”: “vscode-icons”,
// 控制已更新文件的自动保存。接受的值:“off”、”afterDelay”、“onFocusChange”(编辑器失去焦点)、“onWindowChange”(窗口失去焦点)。如果设置为“afterDelay”,则可在 “files.autoSaveDelay” 中配置延迟。
“files.autoSave”: “onWindowChange”,
// 配置语言的文件关联(如: “.extension”: “html”)。这些关联的优先级高于已安装语言的默认关联。
“files.associations”: {
.vue”: “vue”
},
// 配置 glob 模式以在搜索中排除文件和文件夹。从 files.exclude 设置中继承所有 glob 模式。
“search.exclude”: {
/node_modules”: true,
/bower_components”: true,
“**/dist”: true
},
// 为指定的语法定义配置文件或使用带有特定规则的配置文件。
“emmet.triggerExpansionOnTab”: true,
“emmet.includeLanguages”: {
“vue-html”: “html”,
“vue”: “html”
},
“emmet.syntaxProfiles”: {
“javascript”: “jsx”,
“vue”: “html”,
“vue-html”: “html”
},
// 自动更新扩展
“extensions.autoUpdate”: true,
// ESlint
“eslint.autoFixOnSave”: true,
“eslint.options”: {
“extensions”: [
“.js”,
“.vue”
]
},
“eslint.validate”: [
“javascript”,{
“language”: “vue”,
“autoFix”: true
},
“html”,
“vue”
],
“vsicons.dontShowNewVersionMessage”: true,
“git.autofetch”: true,
“git.enableSmartCommit”: true,
“explorer.confirmDragAndDrop”: false,
“files.eol”: “\n”,
“vetur.format.defaultFormatter.html”: “js-beautify-html”,
}

常用插件

微信打赏

赞赏是不耍流氓的鼓励