vscode settings.json文件


{
    "editor.tabSize": 2,
    "workbench.iconTheme": "vscode-icons",
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "search.followSymlinks": false,
    "files.autoSave": "onFocusChange",
    "gitlens.advanced.messages": {
        "suppressCommitHasNoPreviousCommitWarning": false,
        "suppressCommitNotFoundWarning": false,
        "suppressFileNotUnderSourceControlWarning": false,
        "suppressGitDisabledWarning": false,
        "suppressGitVersionWarning": false,
        "suppressLineUncommittedWarning": false,
        "suppressNoRepositoryWarning": false,
        "suppressSupportGitLensNotification": false,
        "suppressShowKeyBindingsNotice": true
    },
    "git.ignoreMissingGitWarning": true,
    "git.enableSmartCommit": true,
    "git.confirmSync": false,
    "git.autofetch": true,
    "explorer.confirmDelete": false,
    "explorer.confirmDragAndDrop": false,
    "search.exclude": {
        "**/node_modules": true,
        "**/bower_components": true,
        "**/dist": true
    },
    "emmet.syntaxProfiles": {
        "javascript": "jsx",
        "vue": "html",
        "vue-html": "html"
    },
    "[html]": {
        "editor.defaultFormatter": "vscode.html-language-features"
    },
    "[vue]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[javascript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[css]": {
        "editor.defaultFormatter": "michelemelluso.code-beautifier"
    },
    "vetur.format.defaultFormatterOptions": {
        "js-beautify-html": {
            "wrap_line_length": 120,
            "wrap_attributes": "auto",
            "end_with_newline": true
        }
    },
    "vetur.format.defaultFormatter.html": "js-beautify-html",
    "vetur.format.defaultFormatter.js": "vscode-typescript",
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true,
    },
    "javascript.updateImportsOnFileMove.enabled": "always",
    "[json]": {
        "editor.defaultFormatter": "vscode.json-language-features"
    },
    "window.zoomLevel": 1,
    "diffEditor.ignoreTrimWhitespace": false,
    "[less]": {
        "editor.defaultFormatter": "michelemelluso.code-beautifier"
    },
    "[markdown]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "leetcode.endpoint": "leetcode-cn",
    "[jsonc]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
}

使用prettier之后,需要在項目根目錄增加.prettierrc文件,配置

{
  "eslintIntegration": true,
  "semi": false,
  "singleQuote": true,
  "printWidth": 140,
  "wrapAttributes": false,
  "sortAttributes": false
}

 


免責聲明!

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



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