我设置了一个多根工作区,其中四个文件夹中的两个是外部的,因此我无法向该文件夹添加特定设置。我想禁用对这些文件夹的搜索,最好是在工作区设置中。
我找不到合适的模式来完成这项工作:(
以下是我的工作区设置,我正在尝试筛选出文件夹中的文件:
"folders": [
{
"name": "Application"
"path": "./application"
},
{
"name": "Device"
"path": "./device"
},
{
"name": "Out"
"path": "./out"
}],
"settings": {
// Configure glob patterns for excluding files and folders in searches. Inherits all glob patterns from the files.exclude setting.
"search.exclude": {
"out": true,
"**/tests": true,
".tags": true
},
如https://stackoverflow.com/a/33418660/6225923所述,您可以使用工作区设置并添加要排除的文件夹模式,如下所示:
"search.excludeFolders": [
"folder1",
"folder2",
"folder3",
"path/to/other/folder4"
],
此外,确保搜索exlusion仍然处于活动状态是设置。