ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

vscode配置setting.json

2022-08-15 12:03:11  阅读:347  来源: 互联网

标签:false vscode eslint enabled json setting editor true prettier


配置setting.json

{
    "editor.largeFileOptimizations": false,
    "editor.fontSize": 15,
    "bracketPairColorizer.depreciation-notice": false,
    "files.autoSave": "onFocusChange",
    "workbench.preferredLightColorTheme": "Visual Studio Light",
    "liveServer.settings.donotShowInfoMsg": true,
    "liveServer.settings.CustomBrowser": "chrome",
    "security.workspace.trust.untrustedFiles": "open",
    "editor.tokenColorCustomizations": {
        "comments": "#3ee5eb"
    },
    "emmet.showSuggestionsAsSnippets": true,
    "kite.showWelcomeNotificationOnStartup": false,
    "editor.suggest.snippetsPreventQuickSuggestions": false,
    "javascript.referencesCodeLens.showOnAllFunctions": true,
    "javascript.referencesCodeLens.enabled": true,
    "typescript.inlayHints.functionLikeReturnTypes.enabled": true,
    "typescript.inlayHints.propertyDeclarationTypes.enabled": true,
    "typescript.inlayHints.parameterTypes.enabled": true,
    "typescript.inlayHints.variableTypes.enabled": true,
    "explorer.compactFolders": false,
    "workbench.editor.untitled.hint": "hidden",
    "editor.bracketPairColorization.enabled": true,
    "editor.guides.bracketPairs": "active",
    "emmet.triggerExpansionOnTab": true,
    "js/ts.implicitProjectConfig.strictFunctionTypes": false,
    "redhat.telemetry.enabled": true,
    // 換行
    "editor.wordWrap": "on",
    // 是否允许自定义的snippet片段提示
    "editor.snippetSuggestions": "top",
    // vscode默认启用了根据文件类型自动设置tabsize的选项 不檢查縮進,保存后統一按設置項來設置
    "editor.detectIndentation": false,
    // 重新设定tabsize 代码缩进修改成 4 个空格
    "editor.tabSize": 4,
    // #每次保存的时候自动格式化
    "editor.formatOnSave": true,
    // #每次保存的时候将代码按eslint格式进行修复 使用eslint 風格使用standard 進行代碼規則限制
    "editor.fontWeight": "200",
    "editor.formatOnType": true,
    "git.confirmSync": false,
    "team.showWelcomeMessage": false,
    "window.zoomLevel": 0,
    "editor.renderWhitespace": "boundary",
    "editor.cursorBlinking": "smooth",
    "editor.wordWrapColumn": 100,
    "editor.minimap.enabled": false,
    "window.title": "${dirty}${activeEditorMedium}${separator}${rootName}",
    "editor.codeLens": true,
    // eslint 代码自动检查相关配置
    "eslint.enable": true,
    "eslint.run": "onType",
    "eslint.options": {
        "plugins": ["html", "vue"],
        "extensions": [".js", ".vue"]
    },
    "eslint.codeAction.showDocumentation": {
        "enable": true
    },
 ​
    /* prettier格式化 */
 ​
    /* prettier格式化的配置 start */
    "prettier.printWidth": 800, // 超过最大值换行
    "prettier.tabWidth": 4, // 缩进字节数
    "prettier.useTabs": false, // 缩进不使用tab,使用空格
    "prettier.semi": true, // 句尾添加分号
    "prettier.singleQuote": true, // 使用单引号代替双引号
    "prettier.proseWrap": "preserve", // 默认值。因为使用了一些折行敏感型的渲染器(如GitHub comment)而按照markdown文本样式进行折行
    "prettier.arrowParens": "avoid", // (x) => {} 箭头函数参数只有一个时是否要有小括号。avoid:省略括号
    "prettier.bracketSpacing": true, // 在对象,数组括号与文字之间加空格 "{ foo: bar }"
    // "prettier.disableLanguages": ["vue"], // 不格式化vue文件,vue文件的格式化单独设置
    "prettier.endOfLine": "auto", // 结尾是 \n \r \n\r auto
    "prettier.eslintIntegration": false, //不让prettier使用eslint的代码格式进行校验
    "prettier.htmlWhitespaceSensitivity": "ignore",
    "prettier.ignorePath": ".prettierignore", // 不使用prettier格式化的文件填写在项目的.prettierignore文件中
    "prettier.jsxBracketSameLine": false, // 在jsx中把'>' 是否单独放一行
    "prettier.jsxSingleQuote": false, // 在jsx中使用单引号代替双引号
    "prettier.parser": "babylon", // 格式化的解析器,默认是babylon
    "prettier.requireConfig": false, // Require a 'prettierconfig' to format prettier
    "prettier.stylelintIntegration": false, //不让prettier使用stylelint的代码格式进行校验
    /* prettier格式化的配置 end */
    // #让函数(名)和后面的括号之间加个空格
    "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
 ​
    // 格式化stylus, 需安装Manta's Stylus Supremacy插件
    "stylusSupremacy.insertColons": false, // 是否插入冒号
    "stylusSupremacy.insertSemicolons": false, // 是否插入分号
    "stylusSupremacy.insertBraces": false, // 是否插入大括号
    "stylusSupremacy.insertNewLineAroundImports": false, // import之后是否换行
    "stylusSupremacy.insertNewLineAroundBlocks": false, // 两个选择器中是否换行
    "explorer.confirmDelete": false,
    "files.associations": {
        "*.cjson": "jsonc",
        "*.wxss": "css",
        "*.wxs": "javascript"
    },
    "emmet.includeLanguages": {
        "wxml": "html"
    },
    "minapp-vscode.disableAutoConfig": true,
    "window.menuBarVisibility": "visible",
    "git.enableSmartCommit": true,
    "git.autofetch": true,
    // 設置行高
    "editor.lineHeight": 20,
    "search.followSymlinks": false,
    "workbench.sideBar.location": "left",
    "vscode_custom_css.policy": true,
 ​
    "javascript.format.placeOpenBraceOnNewLineForControlBlocks": true,
    "editor.formatOnPaste": true,
    "vsicons.presets.hideFolders": true,
    "editor.cursorStyle": "line-thin",
    "editor.suggestSelection": "recentlyUsedByPrefix",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    // #每次保存的时候将代码按照 eslint 格式进行修复
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },
    "terminal.integrated.rendererType": "dom",
    "vscode_vibrancy.opacity": 1,
    "npm.fetchOnlinePackageInfo": false,
    "java.import.gradle.offline.enabled": true,
    "files.simpleDialog.enable": true,
    "calva.referencesCodeLens.enabled": true,
    "eslint.format.enable": true,
    "eslint.lintTask.enable": true,
    "java.signatureHelp.description.enabled": true,
    "java.signatureHelp.enabled": true,
    "vscodeReactRefactor.enableDebug": true,
    "vitest.enable": true,
    "vite.https": true,
    "javascript.inlayHints.propertyDeclarationTypes.enabled": true,
    "tslint.jsEnable": true,
    "npm.enableRunFromFolder": true,
    "reactSnippets.settings.prettierEnabled": true,
    "todo-tree.general.enableFileWatcher": true,
    "todo-tree.tree.buttons.groupBySubTag": true,
    "target": "es6",
    "vetur.format.options.tabSize": 4,
    "vetur.format.scriptInitialIndent": true, // js部分是否有初始缩进
    "vetur.format.styleInitialIndent": true, // style部分是否有初始缩进
    "vetur.completion.scaffoldSnippetSources": {},
    "vetur.format.defaultFormatter.html": "js-beautify-html", // js 不换行
    "vetur.format.defaultFormatterOptions": {
        "js-beautify-html": {
            "wrap_attributes": "auto", // html 标签属性 换行设置[auto|force|force-aligned|force-expand-multiline] ["auto"]
            "end_with_newline": false, // 在文件结尾添加新行
            "wrap_line_length": 120,
            "semi": false // 是否在每行末尾添加分号
        },
        "prettyhtml": {
            "singleQuote": false,
            "wrapAttributes": false,
            "sortAttributes": false
        },
        "prettier": {
            // 不加分号
            "semi": false,
            // 用单引号
            "singleQuote": true,
            // 禁止随时添加逗号
            "trailingComma": "none"
        }
    },
 ​
    // 显示 markdown 中英文切换时产生的特殊字符
    "editor.renderControlCharacters": true,
    // 新开窗口
    "workbench.startupEditor": "newUntitledFile",
    // 默认 lf 结尾
    "files.eol": "\n",
    // vscode update tips
    "update.mode": "none",
    // Internal terminal
    "code-runner.runInTerminal": true,
    "code-runner.fileDirectoryAsCwd": true,
    // vscode Suggested expansion
    "extensions.ignoreRecommendations": false,
    "editor.defaultFormatter": "octref.vetur",
 ​
    "vue-helper.indent-size": 4,
    "vue3snippets.useTabs": true,
    "vue3snippets.tabWidth": 4,
    "vue3snippets.jsxBracketSameLine": true,
    "vue3snippets.jsxSingleQuote": true,
    "vue3snippets.insertPragma": true,
    "vue3snippets.requirePragma": true,
    "vue3snippets.vueIndentScriptAndStyle": true,
 ​
    "easysass.compileAfterSave": true,
    "easysass.formats": [
        {
            "format": "nested",
            "extension": ".css"
        },
        {
            "format": "nested",
            "extension": ".css"
        }
    ],
    "easysass.targetDir": "css/",
 ​
    "editor.parameterHints": true,
    "editor.quickSuggestions": {
        "other": true,
        "comments": true,
        "strings": true
    },
    "workbench.editor.enablePreview": false,
    "[vue]": {
        "editor.defaultFormatter": "octref.vetur"
    },
    "editor.minimap.renderCharacters": false,
    "javascript.validate.enable": false,
    "editor.inlayHints.enabled": "off",
    "javascript.inlayHints.enumMemberValues.enabled": true,
    "javascript.inlayHints.functionLikeReturnTypes.enabled": true,
    "editor.tabCompletion": "onlySnippets",
    "vetur.format.options.useTabs": true,
    "[html]": {
        "editor.defaultFormatter": "HookyQR.beautify"
    },
 ​
    "[sass]": {
        "editor.defaultFormatter": "syler.sass-indented"
    },
 ​
    //-------- Code Spell Checker Configuration --------
    // The Language locale to use when spell checking. "en", "en-US" and "en-GB" are currently supported by default.
    "cSpell.language": "en",
 ​
    // Controls the maximum number of spelling errors per document.
    "cSpell.maxNumberOfProblems": 100,
 ​
    // Controls the number of suggestions shown.
    "cSpell.numSuggestions": 8,
 ​
    // The minimum length of a word before checking it against a dictionary.
    "cSpell.minWordLength": 4,
 ​
    // Specify file types to spell check.
    "cSpell.enabledLanguageIds": ["csharp", "go", "javascript", "javascriptreact", "markdown", "php", "plaintext", "typescript", "typescriptreact", "yml"],
 ​
    // Enable / Disable the spell checker.
    "cSpell.enabled": true,
 ​
    // Display the spell checker status on the status bar.
    "cSpell.showStatus": true,
 ​
    // Words to add to dictionary for a workspace.
    "cSpell.words": [],
 ​
    // Enable / Disable compound words like 'errormessage'
    "cSpell.allowCompoundWords": false,
 ​
    // Words to be ignored and not suggested.
    "cSpell.ignoreWords": ["behaviour"],
 ​
    // User words to add to dictionary. Should only be in the user settings.
    "cSpell.userWords": [],
 ​
    // Specify paths/files to ignore.
    "cSpell.ignorePaths": [
        "node_modules", // this will ignore anything the node_modules directory
        "**/node_modules", // the same for this one
        "**/node_modules/**", // the same for this one
        "node_modules/**", // Doesn't currently work due to how the current working directory is determined.
        "vscode-extension", //
        ".git", // Ignore the .git directory
        "*.dll", // Ignore all .dll files.
        "**/*.dll" // Ignore all .dll files
    ]
 ​
 }
 ​

 

标签:false,vscode,eslint,enabled,json,setting,editor,true,prettier
来源: https://www.cnblogs.com/zhaostudy/p/16587780.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有