1 // 通過將設置放入設置文件中來覆蓋設置。 2 { 3 4 //-------- 編輯器配置 -------- 5 6 // 控制字體系列。 7 "editor.fontFamily": "Consolas, 'Courier New', monospace", 8 9 // 控制字體大小。 10 "editor.fontSize": 14, 11 12 // 控制行高。 13 "editor.lineHeight": 0, 14 15 // 控制行號的可見性 16 "editor.lineNumbers": true, 17 18 // 控制字形邊距的可見性 19 "editor.glyphMargin": false, 20 21 // 顯示垂直標尺的列 22 "editor.rulers": [], 23 24 // 執行文字相關的導航或操作時將用作文字分隔符的字符 25 "editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?", 26 27 // 一個制表符等於的空格數。 28 "editor.tabSize": 4, 29 30 // 按 "Tab" 時插入空格。 31 "editor.insertSpaces": true, 32 33 // 當打開文件時,將基於文件內容檢測 "editor.tabSize" 和 "editor.insertSpaces"。 34 "editor.detectIndentation": true, 35 36 // 控制選取范圍是否有圓角 37 "editor.roundedSelection": true, 38 39 // 控制編輯器是否可以滾動到最后一行之后 40 "editor.scrollBeyondLastLine": true, 41 42 // 控制在多少個字符后編輯器會自動換到下一行。將其設置為 0 則將打開視區寬度換行(自動換行)。將其設置為 -1 則將強制編輯器始終不換行。 43 "editor.wrappingColumn": 300, 44 45 // 控制換行的行的縮進。可以是"none"、 "same" 或 "indent"。 46 "editor.wrappingIndent": "same", 47 48 // 要對鼠標滾輪滾動事件的 "deltaX" 和 "deltaY" 使用的乘數 49 "editor.mouseWheelScrollSensitivity": 1, 50 51 // 控制鍵入時是否應顯示快速建議 52 "editor.quickSuggestions": true, 53 54 // 控制延遲多少毫秒后將顯示快速建議 55 "editor.quickSuggestionsDelay": 10, 56 57 // 控制編輯器是否應該在左括號后自動插入右括號 58 "editor.autoClosingBrackets": true, 59 60 // 控制編輯器是否應在鍵入后自動設置行的格式 61 "editor.formatOnType": false, 62 63 // 控制鍵入觸發器字符時是否應自動顯示建議 64 "editor.suggestOnTriggerCharacters": true, 65 66 // 控制除了 "Tab" 以外,是否還應在 "Enter" 時接受建議。幫助避免“插入新行”或“接受建議”之間的歧義。 67 "editor.acceptSuggestionOnEnter": true, 68 69 // 控制編輯器是否應突出顯示選項的近似匹配 70 "editor.selectionHighlight": true, 71 72 // 控制可在概述標尺同一位置顯示的效果數量 73 "editor.overviewRulerLanes": 3, 74 75 // 控制光標閃爍動畫,接受的值為'blink'、'visible' 和 'hidden' 76 "editor.cursorBlinking": "blink", 77 78 // 控制光標樣式,接受的值為 'block' 和 'line' 79 "editor.cursorStyle": "line", 80 81 // 啟用字體連字 82 "editor.fontLigatures": false, 83 84 // 控制光標是否應隱藏在概述標尺中。 85 "editor.hideCursorInOverviewRuler": false, 86 87 // 控制編輯器是否應呈現空白字符 88 "editor.renderWhitespace": false, 89 90 // 控制編輯器是否顯示支持它的模式的參考信息 91 "editor.referenceInfos": true, 92 93 // 控制編輯器是否啟用代碼折疊功能 94 "editor.folding": true, 95 96 // 在制表位后插入和刪除空格 97 "editor.useTabStops": true, 98 99 // 刪除尾隨自動插入的空格 100 "editor.trimAutoWhitespace": true, 101 102 // Keep peek editors open even when double clicking their content or when hitting Escape. 103 "editor.stablePeek": false, 104 105 // 控制 Diff 編輯器以並排或內聯形式顯示差異 106 "diffEditor.renderSideBySide": true, 107 108 // 控制差異編輯器是否將對前導空格或尾隨空格的更改顯示為差異 109 "diffEditor.ignoreTrimWhitespace": true, 110 111 112 //-------- 窗口配置 -------- 113 114 // 啟用后,將在新窗口中打開文件,而不是重復使用現有實例。 115 "window.openFilesInNewWindow": true, 116 117 // 控制重啟后重新打開文件夾的方式。選擇“none”表示永不重新打開文件夾,選擇“one”表示重新打開最后使用的一個文件夾,或選擇“all”表示打開上次會話的所有文件夾。 118 "window.reopenFolders": "one", 119 120 // 調整窗口的縮放級別。原始大小是 0,每次遞增(例如 1)或遞減(例如 -1)表示放大或縮小 20%。也可以輸入小數以便以更精細的粒度調整縮放級別。 121 "window.zoomLevel": 0, 122 123 124 //-------- 文件配置 -------- 125 126 // 配置 glob 模式以排除文件和文件夾。 127 "files.exclude": { 128 "**/.git": true, 129 "**/.svn": true, 130 "**/.DS_Store": true 131 }, 132 133 // 配置語言的文件關聯(如: "*.extension": "html")。這些關聯的優先級高於已安裝語言的默認關聯。 134 "files.associations": {}, 135 136 // 讀取和編寫文件時將使用的默認字符集編碼。 137 "files.encoding": "utf8", 138 139 // 默認行尾字符。 140 "files.eol": "\r\n", 141 142 // 啟用后,將在保存文件時剪裁尾隨空格。 143 "files.trimTrailingWhitespace": false, 144 145 // 控制已更新文件的自動保存。接受的值:“off”、“afterDelay”、“onFocusChange”。如果設置為“afterDelay”,則可在 "files.autoSaveDelay" 中配置延遲。 146 "files.autoSave": "off", 147 148 // 控制延遲(以秒為單位),在該延遲后將自動保存更新后的文件。僅在 "files.autoSave" 設置為“afterDelay”時適用。 149 "files.autoSaveDelay": 1000, 150 151 // 配置文件路徑的 glob 模式以從文件監視排除。更改此設置要求重啟。如果在啟動時遇到 Code 消耗大量 CPU 時間,則可以排除大型文件夾以減少初始加載。 152 "files.watcherExclude": { 153 "**/.git/objects/**": true 154 }, 155 156 157 //-------- Emmet 配置 -------- 158 159 // 啟用后,按 TAB 鍵時,將展開 Emmet 縮寫。 160 "emmet.triggerExpansionOnTab": true, 161 162 163 //-------- 文件資源管理器配置 -------- 164 165 // 在滾動條出現之前將顯示的最大工作文件數目。 166 "explorer.workingFiles.maxVisible": 9, 167 168 // 控制工作文件部分的高度是否應動態適應元素數量。 169 "explorer.workingFiles.dynamicHeight": true, 170 171 // 控制資源管理器是否應在打開文件時自動顯示它們。 172 "explorer.autoReveal": true, 173 174 175 //-------- HTTP 配置 -------- 176 177 // 要使用的代理設置。如果尚未設置,則將從 http_proxy 和 https_proxy 環境變量獲取 178 "http.proxy": "", 179 180 // 是否應根據提供的 CA 列表驗證代理服務器證書。 181 "http.proxyStrictSSL": true, 182 183 184 //-------- 搜索配置 -------- 185 186 // 配置 glob 模式以在搜索中排除文件和文件夾。從 files.exclude 設置中繼承所有 glob 模式。 187 "search.exclude": { 188 "**/node_modules": true, 189 "**/bower_components": true 190 }, 191 192 193 //-------- 更新配置 -------- 194 195 // 配置從中接收更新的更新頻道。更改后需要重啟。 196 "update.channel": "default", 197 198 199 //-------- GIT 配置 -------- 200 201 // 是否啟用了 GIT 202 "git.enabled": true, 203 204 // 可執行 GIT 的路徑 205 "git.path": null, 206 207 // 是否啟用了自動提取。 208 "git.autofetch": true, 209 210 211 //-------- 標記預覽配置 -------- 212 213 // 標記預覽中供使用的 CSS 樣式表的 URL 或本地路徑列表。 214 "markdown.styles": [], 215 216 217 //-------- JSON configuration -------- 218 219 // Associate schemas to JSON files in the current project 220 "json.schemas": [], 221 222 223 //-------- 遙測配置 -------- 224 225 // 啟用要發送給 Microsoft 的使用情況數據和錯誤。 226 "telemetry.enableTelemetry": true, 227 228 229 //-------- 遙測配置 -------- 230 231 // 啟用要發送給 Microsoft 的故障報表。 232 // 此選項需重啟才可生效。 233 "telemetry.enableCrashReporter": true, 234 235 236 //-------- CSS 配置 -------- 237 238 // 控制 CSS 驗證和問題嚴重性。 239 240 // 啟用或禁用所有驗證 241 "css.validate": true, 242 243 // 使用供應商特定前綴時,確保同時包括所有其他供應商特定屬性 244 "css.lint.compatibleVendorPrefixes": "ignore", 245 246 // 使用供應商特定前綴時,還應包括標准屬性 247 "css.lint.vendorPrefix": "warning", 248 249 // 不要使用重復的樣式定義 250 "css.lint.duplicateProperties": "ignore", 251 252 // 不要使用空規則集 253 "css.lint.emptyRules": "warning", 254 255 // Import 語句不會並行加載 256 "css.lint.importStatement": "ignore", 257 258 // 使用邊距或邊框時,不要使用寬度或高度 259 "css.lint.boxModel": "ignore", 260 261 // 已知通配選擇符 (*) 慢 262 "css.lint.universalSelector": "ignore", 263 264 // 零不需要單位 265 "css.lint.zeroUnits": "ignore", 266 267 // @font-face 規則必須定義 "src" 和 "font-family" 屬性 268 "css.lint.fontFaceProperties": "warning", 269 270 // 十六進制顏色必須由三個或六個十六進制數字組成 271 "css.lint.hexColorLength": "error", 272 273 // 參數數量無效 274 "css.lint.argumentsInColorFunction": "error", 275 276 // 未知的屬性。 277 "css.lint.unknownProperties": "warning", 278 279 // 僅當支持 IE7 及更低版本時,才需要 IE hack 280 "css.lint.ieHack": "ignore", 281 282 // 未知的供應商特定屬性。 283 "css.lint.unknownVendorSpecificProperties": "ignore", 284 285 // 因顯示而忽略屬性。例如,使用 "display: inline"時,寬度、高度、上邊距、下邊距和 float 屬性將不起作用 286 "css.lint.propertyIgnoredDueToDisplay": "warning", 287 288 // 避免使用 !important。它表明整個 CSS 的特異性已經失去控制且需要重構。 289 "css.lint.important": "ignore", 290 291 // 避免使用“float”。浮動會帶來脆弱的 CSS,如果布局的某一方面更改,將很容易破壞 CSS。 292 "css.lint.float": "ignore", 293 294 // 選擇器不應包含 ID,因為這些規則與 HTML 的耦合過於緊密。 295 "css.lint.idSelector": "ignore", 296 297 298 //-------- HTML 配置 -------- 299 300 // 每行最大字符數(0 = 禁用)。 301 "html.format.wrapLineLength": 120, 302 303 // 標記列表,以逗號分隔,不應重設格式。"null" 默認為所有內聯標記。 304 "html.format.unformatted": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, script, select, small, span, strong, sub, sup, textarea, tt, var", 305 306 // 縮進 <head> 和 <body> 部分。 307 "html.format.indentInnerHtml": false, 308 309 // 是否要保留元素前面的現有換行符。僅適用於元素前,不適用於標記內或文本。 310 "html.format.preserveNewLines": true, 311 312 // 要保留在一個區塊中的換行符的最大數量。對於無限制使用 "null"。 313 "html.format.maxPreserveNewLines": null, 314 315 // 格式和縮進 {{#foo}} 和 {{/foo}}。 316 "html.format.indentHandlebars": false, 317 318 // 以新行結束。 319 "html.format.endWithNewline": false, 320 321 // 標記列表,以逗號分隔,其前應有額外新行。"null" 默認為“標頭、正文、/html”。 322 "html.format.extraLiners": "head, body, /html", 323 324 325 //-------- LESS 配置 -------- 326 327 // 控制 LESS 驗證和問題嚴重性。 328 329 // 啟用或禁用所有驗證 330 "less.validate": true, 331 332 // 使用供應商特定前綴時,確保同時包括所有其他供應商特定屬性 333 "less.lint.compatibleVendorPrefixes": "ignore", 334 335 // 使用供應商特定前綴時,還應包括標准屬性 336 "less.lint.vendorPrefix": "warning", 337 338 // 不要使用重復的樣式定義 339 "less.lint.duplicateProperties": "ignore", 340 341 // 不要使用空規則集 342 "less.lint.emptyRules": "warning", 343 344 // Import 語句不會並行加載 345 "less.lint.importStatement": "ignore", 346 347 // 使用邊距或邊框時,不要使用寬度或高度 348 "less.lint.boxModel": "ignore", 349 350 // 已知通配選擇符 (*) 慢 351 "less.lint.universalSelector": "ignore", 352 353 // 零不需要單位 354 "less.lint.zeroUnits": "ignore", 355 356 // @font-face 規則必須定義 "src" 和 "font-family" 屬性 357 "less.lint.fontFaceProperties": "warning", 358 359 // 十六進制顏色必須由三個或六個十六進制數字組成 360 "less.lint.hexColorLength": "error", 361 362 // 參數數量無效 363 "less.lint.argumentsInColorFunction": "error", 364 365 // 未知的屬性。 366 "less.lint.unknownProperties": "warning", 367 368 // 僅當支持 IE7 及更低版本時,才需要 IE hack 369 "less.lint.ieHack": "ignore", 370 371 // 未知的供應商特定屬性。 372 "less.lint.unknownVendorSpecificProperties": "ignore", 373 374 // 因顯示而忽略屬性。例如,使用 "display: inline"時,寬度、高度、上邊距、下邊距和 float 屬性將不起作用 375 "less.lint.propertyIgnoredDueToDisplay": "warning", 376 377 // 避免使用 !important。它表明整個 CSS 的特異性已經失去控制且需要重構。 378 "less.lint.important": "ignore", 379 380 // 避免使用“float”。浮動會帶來脆弱的 CSS,如果布局的某一方面更改,將很容易破壞 CSS。 381 "less.lint.float": "ignore", 382 383 // 選擇器不應包含 ID,因為這些規則與 HTML 的耦合過於緊密。 384 "less.lint.idSelector": "ignore", 385 386 387 //-------- Sass 配置 -------- 388 389 // 控制 Sass 驗證和問題嚴重性。 390 391 // 啟用或禁用所有驗證 392 "sass.validate": true, 393 394 // 使用供應商特定前綴時,確保同時包括所有其他供應商特定屬性 395 "sass.lint.compatibleVendorPrefixes": "ignore", 396 397 // 使用供應商特定前綴時,還應包括標准屬性 398 "sass.lint.vendorPrefix": "warning", 399 400 // 不要使用重復的樣式定義 401 "sass.lint.duplicateProperties": "ignore", 402 403 // 不要使用空規則集 404 "sass.lint.emptyRules": "warning", 405 406 // Import 語句不會並行加載 407 "sass.lint.importStatement": "ignore", 408 409 // 使用邊距或邊框時,不要使用寬度或高度 410 "sass.lint.boxModel": "ignore", 411 412 // 已知通配選擇符 (*) 慢 413 "sass.lint.universalSelector": "ignore", 414 415 // 零不需要單位 416 "sass.lint.zeroUnits": "ignore", 417 418 // @font-face 規則必須定義 "src" 和 "font-family" 屬性 419 "sass.lint.fontFaceProperties": "warning", 420 421 // 十六進制顏色必須由三個或六個十六進制數字組成 422 "sass.lint.hexColorLength": "error", 423 424 // 參數數量無效 425 "sass.lint.argumentsInColorFunction": "error", 426 427 // 未知的屬性。 428 "sass.lint.unknownProperties": "warning", 429 430 // 僅當支持 IE7 及更低版本時,才需要 IE hack 431 "sass.lint.ieHack": "ignore", 432 433 // 未知的供應商特定屬性。 434 "sass.lint.unknownVendorSpecificProperties": "ignore", 435 436 // 因顯示而忽略屬性。例如,使用 "display: inline"時,寬度、高度、上邊距、下邊距和 float 屬性將不起作用 437 "sass.lint.propertyIgnoredDueToDisplay": "warning", 438 439 // 避免使用 !important。它表明整個 CSS 的特異性已經失去控制且需要重構。 440 "sass.lint.important": "ignore", 441 442 // 避免使用“float”。浮動會帶來脆弱的 CSS,如果布局的某一方面更改,將很容易破壞 CSS。 443 "sass.lint.float": "ignore", 444 445 // 選擇器不應包含 ID,因為這些規則與 HTML 的耦合過於緊密。 446 "sass.lint.idSelector": "ignore", 447 448 449 //-------- Integrated terminal configuration -------- 450 451 // The path of the shell that the terminal uses on Linux. 452 "terminal.integrated.shell.linux": "sh", 453 454 // The path of the shell that the terminal uses on OS X. 455 "terminal.integrated.shell.osx": "sh", 456 457 // The path of the shell that the terminal uses on Windows. 458 "terminal.integrated.shell.windows": "C:\\Windows\\system32\\cmd.exe", 459 460 // The font family used by the terminal (CSS font-family format). 461 "terminal.integrated.fontFamily": "Menlo, Monaco, Consolas, \"Droid Sans Mono\", \"Courier New\", monospace, \"Droid Sans Fallback\"", 462 463 464 //-------- 外部終端配置 -------- 465 466 // Customizes which terminal to run on Windows. 467 "terminal.external.windowsExec": "cmd", 468 469 // Customizes which terminal to run on Linux. 470 "terminal.external.linuxExec": "xterm", 471 472 473 //-------- TypeScript 配置 -------- 474 475 // 指定包含要使用的 tsserver 和 lib*.d.ts 文件的文件夾路徑。 476 "typescript.tsdk": null, 477 478 // 完成函數的參數簽名。 479 "typescript.useCodeSnippetsOnMethodSuggest": false, 480 481 // 啟用/禁用 TypeScript 驗證 482 "typescript.validate.enable": true, 483 484 // 啟用對發送到 TS 服務器的消息進行跟蹤 485 "typescript.tsserver.trace": "off", 486 487 // 定義逗號分隔符后面的空格處理 488 "typescript.format.insertSpaceAfterCommaDelimiter": true, 489 490 // 在 For 語句中,定義分號之后的空格處理 491 "typescript.format.insertSpaceAfterSemicolonInForStatements": true, 492 493 // 定義二進制運算符后面的空格處理 494 "typescript.format.insertSpaceBeforeAndAfterBinaryOperators": true, 495 496 // 定義控制流語句中的關鍵字之后的空格處理 497 "typescript.format.insertSpaceAfterKeywordsInControlFlowStatements": true, 498 499 // 定義匿名函數的函數關鍵字之后的空格處理 500 "typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true, 501 502 // 定義非空圓括號的左括號之后和右括號之前的空格處理。 503 "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, 504 505 // 定義非空方括號的左括號之后和右括號之前的空格處理。 506 "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, 507 508 // 定義左大括號是否針對函數而放置在新的一行 509 "typescript.format.placeOpenBraceOnNewLineForFunctions": false, 510 511 // 定義左大括號是否針對控制塊而放置在新的一行 512 "typescript.format.placeOpenBraceOnNewLineForControlBlocks": false, 513 514 // 啟用/禁用 JavaScript 驗證 515 "javascript.validate.enable": true, 516 517 // 定義逗號分隔符后面的空格處理 518 "javascript.format.insertSpaceAfterCommaDelimiter": true, 519 520 // 在 For 語句中,定義分號之后的空格處理 521 "javascript.format.insertSpaceAfterSemicolonInForStatements": true, 522 523 // 定義二進制運算符后面的空格處理 524 "javascript.format.insertSpaceBeforeAndAfterBinaryOperators": true, 525 526 // 定義控制流語句中的關鍵字之后的空格處理 527 "javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": true, 528 529 // 定義匿名函數的函數關鍵字之后的空格處理 530 "javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true, 531 532 // 定義非空圓括號的左括號之后和右括號之前的空格處理。 533 "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, 534 535 // 定義非空方括號的左括號之后和右括號之前的空格處理。 536 "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, 537 538 // 定義左大括號是否針對函數而放置在新的一行 539 "javascript.format.placeOpenBraceOnNewLineForFunctions": false, 540 541 // 定義左大括號是否針對控制塊而放置在新的一行 542 "javascript.format.placeOpenBraceOnNewLineForControlBlocks": false, 543 544 545 //-------- PHP 配置選項 -------- 546 547 // 不管 php 驗證是否已啟用。 548 "php.validate.enable": true, 549 550 // 指向可執行的 php。 551 "php.validate.executablePath": null, 552 553 // 不管 linter 是在 save 還是在 type 上運行。 554 "php.validate.run": "onSave", 555 556 // 啟用基於字的建議。 557 "editor.wordBasedSuggestions": true 558 559 }