VS Code 配置

 

 

settings.json

{
    "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
    "css.remoteStyleSheets": [
    ],
    "cssrem.rootFontSize": 14,
    "typescript.disableAutomaticTypeAcquisition": true,
    "emmet.includeLanguages": {
        "vue-html": "html",
        "javascript": "javascriptreact",
        "wxml": "html"
    },
    "less.compile": {
        "outExt": ".wxss"
    },
    "files.associations": {
        "*.cjson": "jsonc",
        "*.wxss": "css",
        "*.wxs": "javascript"
    },
    "minapp-vscode.disableAutoConfig": true,
    "explorer.confirmDelete": false,
    "workbench.colorCustomizations": {
    
    },
    "emmet.triggerExpansionOnTab":true,


    // 換行
  "editor.wordWrap": "on",
  // 是否允许自定义的snippet片段提示
  "editor.snippetSuggestions": "top",
  // vscode默认启用了根据文件类型自动设置tabsize的选项 不檢查縮進,保存后統一按設置項來設置
  "editor.detectIndentation": false,
  // 重新设定tabsize 代码缩进修改成4个空格
  "editor.tabSize": 2,
  // #每次保存的时候自动格式化
  "editor.formatOnSave": false,
  // #每次保存的时候将代码按eslint格式进行修复 使用eslint 風格使用standard 進行代碼規則限制
  "editor.fontWeight": "200",
  "editor.formatOnType": false,
  "workbench.iconTheme": "material-icon-theme",
  "git.confirmSync": false,
  "team.showWelcomeMessage": false,
  "window.zoomLevel": 0,
  "editor.renderWhitespace": "none",
  "editor.cursorBlinking": "smooth",
  "editor.minimap.enabled": true,
  "editor.minimap.renderCharacters": false,
  "window.title": "${dirty}${activeEditorMedium}${separator}${rootName}",
  "editor.codeLens": true,
  //eslint 代码自动检查相关配置
  "eslint.enable": true,
  "eslint.run": "onType",
  "eslint.options": {
    "configFile": "D:/.eslintrc.js",
    "plugins": ["html"],
    "extensions": [
      ".js",
      ".vue"
    ]
  },
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "html",
    "vue"
],
  //  #让prettier使用eslint的代码格式进行校验
  "prettier.eslintIntegration": true,
  //  #去掉代码结尾的分号
  "prettier.semi": true,
  //  #使用带引号替代双引号
  "prettier.singleQuote": true,
  //  #让函数(名)和后面的括号之间加个空格
  "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
  // #这个按用户自身习惯选择  html格式化
  "vetur.format.defaultFormatter.html": "js-beautify-html",
  // #让vue中的js按编辑器自带的ts格式进行格式化
  "vetur.format.defaultFormatter.js": "vscode-typescript",
  "explorer.confirmDelete": false,
  "vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
      "wrap_attributes": "force-aligned"
      // #vue组件中html代码格式化样式
    }
  },
  "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,
  "liveServer.settings.donotShowInfoMsg": true,
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "javascript.updateImportsOnFileMove.enabled": "always",
  "workbench.colorTheme": "Default Dark+",
  // 字體大小
  "editor.fontSize": 14,
  // 設置行高
  "editor.lineHeight": 20,
  "search.followSymlinks": false,
  "workbench.sideBar.location": "left",
  // 高亮的颜色,emm暂时只支持这样写
  "wxmlConfig.activeColor": {
    "color": "#e5c07b"
  },
  // 是否禁用高亮组件
  "wxmlConfig.activeDisable": false,
  // 是否开启保存自动格式化
  "wxmlConfig.onSaveFormat": false,
  "wxmlConfig.format": {
    "brace_style": "collapse",
    "end_with_newline": false,
    "indent_char": "",
    "indent_handlebars": false,
    "indent_inner_html": false,
    "indent_scripts": "keep",
    "indent_size": 2,
    "indent_with_tabs": false,
    "max_preserve_newlines": 1,
    "preserve_newlines": false,
    "wrap_attributes": "force-expand-multiline"
  },
  // 高亮所忽略的组件数组
  "wxmlConfig.tagNoActiveArr": [
    "view",
    "button",
    "text",
    "icon",
    "image",
    "navigator",
    "block",
    "input",
    "template",
    "form",
    "camera",
    "textarea"
  ],
  "zenMode.restore": true,
  "breadcrumbs.enabled": true,
  "[wxml]": {
    "editor.defaultFormatter": "qiu8310.minapp-vscode"
  },
  "gitlens.advanced.messages": {
    "suppressLineUncommittedWarning": true
  },
  "javascript.format.placeOpenBraceOnNewLineForControlBlocks": true,
  "editor.formatOnPaste": false,
  "vsicons.presets.hideFolders": true,
  "editor.cursorStyle": "line-thin",
  "editor.suggestSelection": "first",
  "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "terminal.integrated.rendererType": "dom",
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "git.ignoreWindowsGit27Warning": true,
  //配置css自动补充前缀
  "autoprefixer.options": [
    // "last 9 versions", 
    "ie >= 6",  //ie6以上
    "firefox >= 8",
    "chrome >= 24",
    "Opera>=10"
  ],
  // 使能每一种语言默认格式化规则
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[css]": {
      "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[less]": {
      "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[javascript]": { 
      "editor.defaultFormatter": "esbenp.prettier-vscode"
  },

  /*  prettier的配置 */
  "prettier.printWidth": 100, // 超过最大值换行
  "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.trailingComma": "es5", // 在对象或数组最后一个元素后面是否加逗号(在ES5中加尾逗号)
  "prettier.tslintIntegration": false // 不让prettier使用tslint的代码格式进行校验
}

keybindings.json //快捷键设置

// 将键绑定放在此文件中以覆盖默认值auto[]
[
    {
        "key": "shift+enter",
        "command": "editor.action.insertLineAfter",
        "when": "editorTextFocus && !editorReadonly"
    },
    {
        "key": "ctrl+enter",
        "command": "-editor.action.insertLineAfter",
        "when": "editorTextFocus && !editorReadonly"
    },
    {
        "key": "ctrl+alt+l",
        "command": "editor.action.formatDocument",
        "when": "editorHasDocumentFormattingProvider && editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor"
    },
    {
        "key": "shift+alt+f",
        "command": "-editor.action.formatDocument",
        "when": "editorHasDocumentFormattingProvider && editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor"
    },
    {
      "key": "ctrl+shift+c",
      "command": "autoprefixer.execute"
    }
]

 Terminal终端配色

 

  "workbench.colorCustomizations": {
    "terminal.background": "#181818",
    "terminal.foreground": "#00FF00",
    "terminal.dropBackground": "#ff0000",
    "terminal.findMatchBackground": "#ff0000",
    "terminal.ansiBrightBlue": "#8470FF",
    "terminal.ansiBrightGreen": "#00C5CD",
    "terminal.ansiBrightYellow": "#F7CA88",
    "terminalCursor.background": "#FF1493",
    "terminalCursor.foreground": "#FFE4C4",
    "terminal.ansiGreen": "#FFFF00",
    "terminal.ansiRed": "#f00",
    "terminal.ansiBrightBlack": "#EEB4B4",
    "terminal.ansiMagenta": "#BA8BAF"
  }

 最新settings.json

 

{
  "workbench.iconTheme": "vscode-icons",
  "editor.fontFamily": "Fira Code, Consolas, Microsoft YaHei",
  "editor.fontLigatures": true,
  "editor.fontSize": 15,
  "editor.fontWeight": "bold",
  "editor.formatOnSave": true,
  "eslint.validate": ["javascript"],
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[html]": {
    "editor.defaultFormatter": "HookyQR.beautify"
  },
  "json.maxItemsComputed": 20000,

  "[scss]": {
    "editor.defaultFormatter": "HookyQR.beautify"
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "cSpell.userWords": [
    "ccable",
    "jackdeng",
    "labelledby",
    "nums",
    "textbox",
    "Typeahead",
    "UIFW"
  ],
  "px2rem.fixedDigits": 4,
  "px2rem.isNeedNotes": false,
  "local-history.daysLimit": 30, // A day number to purge local history. (0: no purge)
  "local-history.maxDisplay": 10, // A max files to display with local history commands
  "local-history.saveDelay": 0,
  // "eslint.format.enable": true,
  "files.watcherExclude": {
    "**/.bloop": true,
    "**/.metals": true,
    "**/.ammonite": true
  },
  "[css]": {
    "editor.defaultFormatter": "HookyQR.beautify"
  }, // A delay in seconds to save file in local history. {0: no delay}
  "path-autocomplete.pathMappings": {
    "@src": "${folder}/react-apps/apps/" // alias for @src
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "workbench.colorCustomizations": {
    "terminal.background": "#181818",
    "terminal.foreground": "#00FF00",
    // "terminal.dropBackground": "#ff0000",
    // "terminal.findMatchBackground": "#ff0000",
    "terminal.ansiBrightBlue": "#8470FF",
    "terminal.ansiBrightGreen": "#00C5CD",
    "terminal.ansiBrightYellow": "#F7CA88",
    "terminalCursor.background": "#FF1493",
    "terminalCursor.foreground": "#FFE4C4",
    "terminal.ansiGreen": "#FFFF00",
    "terminal.ansiRed": "#f00",
    "terminal.ansiBrightBlack": "#FFFF00",
    "terminal.ansiMagenta": "#BA8BAF"
  },
  "javascript.updateImportsOnFileMove.enabled": "never",
  "explorer.confirmDelete": false,
  "markdown-pdf.breaks": true,
  "markdown-pdf.displayHeaderFooter": false,
  "markdown-pdf.margin.top": "0.5cm",
  "markdown-pdf.outputDirectory": "/home/jackdeng/Documents/PDF",
  "markdown-pdf.orientation": "landscape",
  "workbench.colorTheme": "Visual Studio Dark"
}

 

  

 

posted @ 2020-09-06 10:14  一路向北√  阅读(386)  评论(0编辑  收藏  举报

web应用开发&研究 -

业精于勤而荒于嬉。

工作,使我快乐。


Font Awesome | Respond.js | Bootstrap中文网