Skip to content

工具 - vscode配置技巧

::: tip

  • 请在项目下自行创建.vscode/settings.json文件,把你需要用到的配置写到settings.json文件中。

  • 每个开发者的习惯可能不一样,所以,暂**不**把项目的的vscode的配置上传至git仓库中。

:::

{
    "files.exclude": {
        "tools/": true,
        "cadvanced/": false,
        "pear/": false,
        "cherry/": false,
        "common/failover": true,
        "common/kernel": true,
        "common/linux-*": true,
        "common/repeater": true,
        "common/stwd100-*": true,
        "common/usb*": true,
        "common/modifymac": true,
        "common/azure*": false,
        "common/aws*": true,
        "grapes/thingoo*": false
    },
    "C_Cpp.intelliSenseEngine": "Disabled",
    "explorer.excludeGitIgnore": true,
    "git.detectSubmodules": false,
    "git.ignoreSubmodules": false,
    "git.autoRepositoryDetection": "openEditors"
}
  • files.exclude 用于禁止在vscode文档列表中显示目录结构,在packages仓库中可以用到,防止显示过多文件,影响开发效率。
  • C_Cpp.intelliSenseEngine可以禁止cpptools工具工作,比如我们不需要再openwrt仓库中开发代码的,这个选项可能会用到。
  • explorer.excludeGitIgnore这个是vscode会跟随gitignore文件的忽略条件,可以不显示被git忽略的文件夹和文件。
  • git.detectSubmodulesgit.ignoreSubmodulesgit.autoRepositoryDetection, 这些是防止加载过多的子模块,由于aws/azure的仓库有很多子模块, 所以在packages仓库上一定会用得上这些配置。