如何避免 files.exclude、files.watcherExclude 和 search.exclude 设置之间的重复?

问题描述 投票:0回答:1

我的软件项目有一个巨大的构建文件夹,这使得我的处理器始终处于 100% 状态。我发现了一些可以解决我的 CPU 问题的设置。这是我的 .vscode/settings 文件:

{
    "files.watcherExclude": {
        "**/build/**": true
    },
    "files.exclude": {
        "**/build/**": true
    },
    "search.exclude": {
        "**/build/**": true
    }
}

我现在必须添加大约十个排除路径。有什么方法可以简化设置,以便我不必为每个 *.exclude 属性粘贴十个路径?

visual-studio-code
1个回答
0
投票

search.exclude
默认继承自
files.exclude
,因此您无需在
files.exclude
中复制
search.exclude
内容。

files.watcherExclude
不继承任何东西(根据文档和测试),所以你可能需要重复一遍。

© www.soinside.com 2019 - 2024. All rights reserved.