zjffun / vscode-snippets-manager

Create and edit snippets easily.
https://marketplace.visualstudio.com/items?itemName=zjffun.snippetsmanager
MIT License
36 stars 5 forks source link

在scope选项里不能用正则表达式 #12

Closed 4674ghkbvgy closed 1 month ago

4674ghkbvgy commented 1 year ago

不知道是不是我没理解怎么使用这个插件,但是比如我在给json文件增加片段时: 使用 范围:json是可以正常识别到json文件的, 但是 范围:*/.vscode/.json 或者 *.json都不能正确识别和应用。

zjffun commented 1 year ago

确实,因为这个拓展程序使用的是 VS Code 自带的 Snippets 的能力,目前范围只支持语言标识,例如:javajavascriptjson 等,不支持指定到文件。

语言标识就是我们平时这里选择的:

Screen Shot 2023-04-01 at 15 42 59

目前已知的语言标识可以参考这个文档

VS Code 自带的代码片段可以参考这个文档

snippet definition may have an additional scope property that takes one or more language identifiers

zjffun commented 1 month ago

Closing this issue due to inactivity. Please feel free to reopen this issue if you are still running into issues and we would be happy to help troubleshoot further.