【发布时间】:2021-03-26 00:34:53
【问题描述】:
我正在编写一个 VS Code 扩展,其中,我希望所有以 .xyz 结尾的文件都在 VS Code 扩展中使用特定的 JSON 模式,为此,我在 contribution 在 package.json 中:
"jsonValidation": [
{
"fileMatch": "/*.xyz",
"url": "http://127.0.0.1:8080/xyz.schema.json"
},
{
"fileMatch": "/.xyz",
"url": "http://127.0.0.1:8080/xyz.schema.json"
},
{
"fileMatch": "*.xyz",
"url": "http://127.0.0.1:8080/xyz.schema.json"
},
{
"fileMatch": ".xyz",
"url": "http://127.0.0.1:8080/xyz.schema.json"
},
{
"fileMatch": "/xyz",
"url": "http://127.0.0.1:8080/xyz.schema.json"
}
]
但似乎没有什么对我有用。有没有人知道正确的 fileMatch 模式。
【问题讨论】:
标签: json regex visual-studio-code vscode-settings vscode-extensions