【VSCode】settings.json

目录

1. 问题:

2. 配置:

3. 参考:


 

1. 问题:

最近一直在用VSCode 写代码,发现网上对这个settings.json 文件解释配置项褒贬不一,各个地方都是粘贴复制一点的;现在简单汇总一下后续持续更新中;

 

2. 配置:

自定义配置项:

{
    "python.pythonPath": "venv2/bin/python",
    "python.formatting.provider": "yapf",
    "python.linting.pylintEnabled": false,
    "python.linting.flake8Enabled": true,
    "python.linting.flake8Args": ["--max-line-length=250"],
    "editor.formatOnSave": true,
    "editor.tabSize": 4,
    "editor.detectIndentation": false,
    "debug.toolBarLocation": "docked",
    // "terminal.integrated.copyOnSelection": true,
    "workbench.editor.enablePreview": false,
    "workbench.editor.enablePreviewFromQuickOpen": false,
    "files.insertFinalNewline": true,
    "files.exclude": {
        "**/.git": true,
        "**/.svn": true,
        "**/.hg": true,
        "**/CVS": true,
        "**/.DS_Store": true,
        "**/*.pyc": true
    },

}

用户工作空间配置项(设置 -> 用户 -> 常用设置 -> Files: Associations 在settings.json 中编辑):

{
    "editor.fontSize": 24,
    "git.autofetch": true,
    "editor.wordWrapColumn": 120,
    "workbench.iconTheme": "vscode-icons",
    "files.exclude": {
        "**/.classpath": true,
        "**/.factorypath": true,
        "**/.project": true,
        "**/.pyc": true,
        "**/.settings": true
    },
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "editor.renderWhitespace": "all",
    "[jsonc]": {
        "editor.defaultFormatter": "HookyQR.beautify"
    },
    "files.autoGuessEncoding": true,
    "[python]": {},
    "terminal.integrated.fontSize": 14,
    "debug.console.fontSize": 14,
    "editor.formatOnSave": true,
    "editor.formatOnType": true,
    "[json]": {
        "editor.defaultFormatter": "HookyQR.beautify"
    },
    "scm.defaultViewMode": "tree",
    "scm.alwaysShowActions": true,
    "editor.renderControlCharacters": true,
    "editor.renderIndentGuides": false,
    "files.autoSave": "afterDelay",
    "workbench.sideBar.location": "left",
    "breadcrumbs.symbolSortOrder": "type",
    "window.zoomLevel": 1,
    "python.jediMemoryLimit": 1024,
    "python.jediEnabled": false,
    // "terminal.integrated.shell.osx": "/usr/local/bin/fish",
    // "terminal.integrated.automationShell.osx": "/bin/sh"
}

 

3. 参考:

  1. User and Workspace Settings;
  2. Editing JSON with Visual Studio Code;
  3. Python settings reference;
  4. VS Code 有哪些必不可少的设置项?
  5. Visual Studio Code
  6. 通过配置 VS Code 来提高生产力;

 

 

(完)

 

你可能感兴趣的:(VSCode)