在VSCode中扩展settings.json

时间:2019-04-05 00:22:27

标签: visual-studio-code vscode-settings

我想将VSCode的settings.json版本检查到我们团队的git repo中,同时仍然允许各个开发人员在此基础上添加自己的设置(即,如果他们想配置他们正在使用的某些扩展名)。是否可以告诉VSCode查看两个不同的文件?即settings.json和settings-local.json,其中settings-local.json被git忽略。

3 个答案:

答案 0 :(得分:1)

Use code --user-data-dir /path/to/user/data/dir to run vscode. VS Code will automatically generate some folders in the selected directory, and settings.json will be located in: SELECTED_DIRECTORY/User/settings.json.

答案 1 :(得分:1)

本地设置优先(settings.local.json)·问题#37519·microsoft / vscode https://github.com/Microsoft/vscode/issues/37519#issuecomment-344414444

这是vscode开发人员的提示。

答案 2 :(得分:0)

{
    "editor.renderWhitespace": "all",
    "editor.tabSize": 2,
    "javascript.validate.enable": false,
    "typescript.updateImportsOnFileMove.enabled": "never",
    "editor.fontSize": 13,
    "editor.suggestSelection": "first",
    "diffEditor.ignoreTrimWhitespace": false,
    "terminal.integrated.shell.osx": "/bin/zsh",
    "eslint.format.enable": true,
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        "typescript",
        "typescriptreact"
    ],
    "javascript.preferences.importModuleSpecifier": "relative",
    "typescript.preferences.importModuleSpecifier": "relative",
    "workbench.activityBar.visible": true,
    "gitlens.gitCommands.closeOnFocusOut": true,
    "editor.semanticHighlighting.enabled": false,
    "tabnine.experimentalAutoImports": true,
    "workbench.colorTheme": "Atom One Dark",
    "editor.wordWrap": "off",
    "[typescriptreact]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "editor.formatOnSave": true,
    "[javascript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "git.autofetch": true,
    "editor.lineHeight": 25,
    "[typescript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "window.zoomLevel": 1,
    "[json]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    }
}