vscode的settings.json配置


  1 {
  2     "[json]": {},
  3     "workbench.sideBar.location": "right",
  4     "editor.wordWrap": "on", // 控制折行方式。可以選擇: - “off” (禁用折行), - “on” (視區折行), - “wordWrapColumn”(在“editor.wordWrapColumn”處折行)或 - “bounded”(在視區與“editor.wordWrapColumn”兩者的較小者處折行)。
  5     "editor.fontSize": 17,
  6     "eslint.autoFixOnSave": true,
  7     "editor.codeActionsOnSave": {
  8         "source.fixAll.eslint": true
  9     },
 10     // ===========以下4個是控制保存時自動格式化的,並且以4格縮進================
 11     "editor.tabCompletion": "on",
 12     "editor.detectIndentation": false,
 13     "editor.tabSize": 4, //vscode設置的縮進量
 14     "editor.formatOnSave": true, //保存時候自動格式化
 15     // ===========以下是根據自己需求配置的============================
 16     "javascript.format.insertSpaceBeforeFunctionParenthesis": true, //  #讓函數(名)和后面的括號之間加個空格
 17     "git.confirmSync": true, // *** 這個是提示空格的點點
 18     // "stylusSupremacy.insertColons": false, // 是否插入冒號
 19     // "stylusSupremacy.insertSemicolons": false, // 是否插入分好
 20     // "stylusSupremacy.insertBraces": false, // 是否插入大括號
 21     // "stylusSupremacy.insertNewLineAroundImports": false, // import之后是否換行
 22     "php.validate.executablePath": "D:\\useful_software\\phpstudy\\PHPTutorial\\php\\php-5.5.38\\php.exe", // 需要配置 php 可執行文件目錄
 23     "eslint.validate": [
 24         "javascript",
 25         "javascriptreact",
 26         {
 27             "language": "typescript",
 28             "autoFix": true
 29         },
 30         {
 31             "language": "typescriptreact",
 32             "autoFix": true
 33         },
 34         {
 35             "language": "vue",
 36             "autoFix": true
 37         },
 38         {
 39             "language": "html",
 40             "autoFix": true
 41         }
 42     ], // 添加 vue 支持
 43     "typescript.format.insertSpaceAfterSemicolonInForStatements": false,
 44     "editor.formatOnType": true // 兩個選擇器中是否換行
 45     "vetur.format.defaultFormatter.js": "vscode-typescript", //讓vue中的js按編輯器自帶的ts格式進行格式化
 46     "vetur.format.defaultFormatterOptions": {
 47         "prettier": {
 48             "semi": false
 49         },
 50         "js-beautify-html": {
 51             "wrap_attributes": "auto"
 52             // #vue組件中html代碼格式化樣式
 53             // - auto: 僅在超出行長度時才對屬性進行換行。
 54             // - force: 對除第一個屬性外的其他每個屬性進行換行。
 55             // - force-aligned: 對除第一個屬性外的其他每個屬性進行換行,並保持對齊。
 56             // - force-expand-multiline: 對每個屬性進行換行。
 57             // - aligned-multiple: 當超出折行長度時,將屬性進行垂直對齊。
 58         }
 59     },
 60     "search.exclude": {
 61         "**/node_modules": true,
 62         "**/bower_components": true,
 63         "**/dist": true
 64     },
 65     "emmet.includeLanguages": {
 66         "vue-html": "html",
 67         "vue": "html",
 68         "javascript": "javascriptreact",
 69         "wxml": "html"
 70     },
 71     // "editor.fontFamily": "'Droid Sans Mono', 'Courier New', monospace, 'Droid Sans Fallback'", //  這個是控制字體樣式的
 72     "files.associations": {
 73         "*.html": "html",
 74         "*.js": "javascriptreact",
 75         "*.vue": "vue",
 76         "*.cjson": "jsonc",
 77         "*.wxss": "css",
 78         "*.wxs": "javascript",
 79         "*.ts": "typescriptreact"
 80     },
 81     "auto-close-tag.activationOnLanguage": [
 82         "xml",
 83         "php",
 84         "blade",
 85         "ejs",
 86         "jinja",
 87         "javascript",
 88         "javascriptreact",
 89         "typescript",
 90         "typescriptreact",
 91         "plaintext",
 92         "markdown",
 93         "vue",
 94         "liquid",
 95         "erb",
 96         "lang-cfml",
 97         "cfml",
 98         "HTML (Eex)"
 99     ],
100     "eslint.options": {
101         "extensions": [
102             ".js",
103             ".vue"
104         ]
105     },
106     // "window.title": "${dirty}${activeEditorMedium}${separator}${rootName}",
107     // ====================================================================
108     // "fileheader.LastModifiedBy": "Oralinge",
109     // "fileheader.Author": "Oralinge",
110     // "git.autofetch": true,
111     // "[html]": {
112     //     "editor.defaultFormatter": "HookyQR.beautify"
113     // },
114     // "editor.detectIndentation": false,
115     // "editor.formatOnSave": true,
116     // "editor.formatOnPaste": true,
117     // "prettier.eslintIntegration": true,
118     // //  #去掉代碼結尾的分號 
119     // "prettier.semi": false,
120     // //  #使用帶引號替代雙引號 
121     // "prettier.singleQuote": true,
122     // #這個按用戶自身習慣選擇 
123     // "vetur.format.defaultFormatter.html": "js-beautify-html",
124     // =====================================
125     // "workbench.iconTheme": "vscode-icons",
126     // "emmet.triggerExpansionOnTab": true,
127     // "tslint.autoFixOnSave": true,
128     // "prettier.semi": false, //去掉代碼結尾的分號
129     // "prettier.singleQuote": true, // 強制單引號
130     // "vetur.format.defaultFormatterOptions": {
131     //   "js-beautify-html": {
132     //     "wrap_attributes": "force-aligned" // 屬性強制折行對齊
133     //   }
134     // },
135     // "javascript.implicitProjectConfig.experimentalDecorators": true,
136     // "[markdown]": {
137     //   "editor.defaultFormatter": "yzhang.markdown-all-in-one"
138     // },
139     // //下面的這些配置一定要留着,很好用
140     // "emmet.syntaxProfiles": {
141     //   "javascript": "jsx",
142     //   "vue": "html",
143     //   "vue-html": "html"
144     // },
145     // // "editor.cursorBlinking": "smooth",
146     // "editor.minimap.enabled": true,
147     // "editor.minimap.renderCharacters": false,
148     // "editor.codeLens": true,
149     // "window.zoomLevel": 0,
150 }






免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM