VSCode 配置

setting.json 文件

按照我的理解,setting.json 文件就是管理 VSCode 中的插件和默认配置的东西

一般有两种 setting.json 的配置文件:

  • 一种位于 C:\Users\LILANJUN\AppData\Roaming\Code\User\settings.json(Windows)
  • 另一种位于项目文件 .vscode 的内部

前者是全局配置
后者是针对单个项目的配置,且可以覆盖前者

展示我的全局配置 setting.json

{
    "background.useFront": true,
    "background.style": {
        "content": "''",
        "pointer-events": "none",
        "position": "absolute",
        "z-index": "99999",
        "width": "100%",
        "height": "100%",
        "background-position": "center right",
        "background-size": "55%",
        "background-repeat": "no-repeat",
        "opacity": 0.1
    },
    "background.customImages": [
        "file:///D:/Funny/Well_picture/云缨/iYunying_48.JPG",
    ],
    "kite.showWelcomeNotificationOnStartup": false,
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "editor.inlineSuggest.enabled": true,
    "github.copilot.enable": {
        "*": true,
        "yaml": false,
        "plaintext": true,
        "markdown": false,
        "python": true
    },
    "cmake.configureOnOpen": false,
    "background.loop": true,
    "background.useDefault": false,
    "security.workspace.trust.untrustedFiles": "open",
    "git.ignoreMissingGitWarning": true,
    "editor.unicodeHighlight.allowedCharacters": {
        "!": true
    },
    "python.linting.pylintCategorySeverity.convention": "Hint",
    "python.linting.pylintCategorySeverity.error": "Hint",
    "python.linting.pylintCategorySeverity.fatal": "Hint",
    "python.linting.pylintCategorySeverity.warning": "Hint",
    "terminal.integrated.fontFamily": "MesloLGS NF",
    "python.formatting.provider": "yapf",
    "python.terminal.activateEnvironment": false,
    "python.analysis.autoImportCompletions": false,
    "python.analysis.diagnosticSeverityOverrides":{
        "reportMissingModuleSource": "none",
    },
    "editor.unicodeHighlight.allowedLocales": {
        "zh-hans": true,
        "zh-hant": true
    },
    "code-runner.runInTerminal": true,
    "terminal.integrated.enableMultiLinePasteWarning": false,
    "terminal.integrated.profiles.windows": {
        "PowerShell": {
            "source": "PowerShell",
            "icon": "terminal-powershell"
        },
        "Command Prompt": {
            "path": [
                "${env:windir}\\Sysnative\\cmd.exe",
                "${env:windir}\\System32\\cmd.exe"
            ],
            "args": [],
            "icon": "terminal-cmd"
        },
        "Git Bash": {
            "source": "Git Bash"
        },
        "Windows PowerShell": {
            "path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
        }
    },
    "python.defaultInterpreterPath": "D:\\Software\\Anaconda\\envs\\reptile\\python.exe",
    "explorer.confirmDelete": false,
    "terminal.integrated.defaultProfile.windows": "Command Prompt",
    "redhat.telemetry.enabled": true,
    "yaml.schemas": {
        "https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
    },
    "editor.unicodeHighlight.nonBasicASCII": false,
    "view-in-browser.customBrowser": "chrome",
    "settingsSync.ignoredSettings": [
        "editor.tabSize"
    ],
    "[jsonc]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "sync.quietSync": false,
    "sync.gist": "e996a3b465e396e29e8e2f7c3f5dea8b",
    "window.zoomLevel": 1,
    "sync.forceUpload": true,
    "sync.forceDownload": true,
    "workbench.colorTheme": "One Dark Pro",
    "workbench.iconTheme": "vscode-icons",
    "[javascript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[javascriptreact]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[typescript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[typescriptreact]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[json]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[vue]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[html]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[css]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[less]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[scss]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[markdown]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[yaml]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "files.associations": {
        "iostream": "cpp",
        "*.tcc": "cpp",
        "optional": "cpp",
        "ratio": "cpp",
        "system_error": "cpp",
        "array": "cpp",
        "functional": "cpp",
        "regex": "cpp",
        "tuple": "cpp",
        "type_traits": "cpp",
        "utility": "cpp",
        "variant": "cpp",
        "ostream": "cpp"
    },
    "vsicons.dontShowNewVersionMessage": true,
    "editor.parameterHints.enabled": true,
    "editor.quickSuggestions": {
        "other": true,
        "comments": true,
        "strings": true
    },
    "[python]": {
        "editor.formatOnType": true
    },
    "go.toolsManagement.autoUpdate": true,
    "notebook.output.textLineLimit": 1000,
    "editor.unicodeHighlight.ambiguousCharacters": false,
    "django.snippets.exclude": [
        "cms",
        "wagtail"
    ],
    "python.languageServer": "Pylance",
}

.VSCode 文件夹

不懂,待补充

一般来说,C:\Users\用户名\.vscode 文件夹(Windows)中包含了 VSCode 中的全部插件

我的某个项目的 .VSCode 文件夹包含了:

  • c_cpp_properties.json
  • launch.json
  • settings.json
  • tasks.json

VSCode 插件

这篇博客(VSCode 插件)

最终配置

还是非常好看的~

posted @ 2022-09-30 15:40  筱团  阅读(745)  评论(0编辑  收藏  举报