vscode用户配置分享

in 普通BLOG
0 评论 阅读量:430

背景

更换电脑后,vscode重新安装整理了下相关的setting.json。作者是php全栈开发,仅供参考。

{
    // start 2024年04月12日 解决Mac vscode code helper 高 cpu 占用,电脑卡顿问题
    "search.followSymlinks": false,
    "files.exclude": {
        "**/.git": true,
        "**/.svn": true,
        "**/.hg": true,
        "**/CVS": true,
        "**/.DS_Store": true,
        "**/tmp": true,
        "**/node_modules": true,
        "**/bower_components": true,
        "**/dist": true
    },
    "files.watcherExclude": {
        "**/.git/objects/**": true,
        "**/.git/subtree-cache/**": true,
        "**/node_modules/**": true,
        "**/tmp/**": true,
        "**/bower_components/**": true,
        "**/dist/**": true
    },
    "git.openRepositoryInParentFolders": "never",
    // end

    // 其他
    "explorer.confirmDelete": false,
    "security.workspace.trust.untrustedFiles": "open",
    "explorer.confirmPasteNative": false,
    "workbench.startupEditor": "none",
    "window.restoreWindows": "all",

    // GIT相关
    "git.autofetch": false,
    "git.confirmSync": false,
    "git.enableSmartCommit": true,
    
    // 编辑器相关
    "editor.minimap.enabled": true,
    "editor.wordWrap": "on",
    "editor.renderControlCharacters": true,
    "editor.fontSize": 15,
    "editor.indentSize": 4, //tab为四个空格
    "editor.detectIndentation": false,
    "editor.insertSpaces": false,
    "[php]": {
        "editor.defaultFormatter": "kokororin.vscode-phpfmt",
        "editor.formatOnSave": true,
    },
    "files.associations": {
        "*.twig": "html",
        "*.wxss": "css",
        "*.wxml": "wxml",
        "*.cjson": "jsonc",
        "*.wxs": "javascript"
    },
}
Comments are closed.