我正在编写一个 TextMate 语法,以使用 Visual Studio Code 扩展 Markdown 语言的语法突出显示功能。预期的结果类似于Fabio 的 vscode-highlight所实现的结果,但我一直在寻找更“简单”的东西,而无需安装或创建扩展。
已经做了很多研究,但在检查范围时找不到任何匹配项。有什么建议么?截至目前,我的文件是:
./package.json
{
"name": "name123",
"description": "desc123",
"publisher": "me",
"version": "0.0.1",
"engines": {
"vscode": "^1.0.0"
},
"contributes": {
"grammars": [{
"language": "markdown",
"scopeName": "text.html.markdown",
"path": "./syntaxes/markdown.tmLanguage.json"
}]
}
}
./syntaxes/markdown.tmLanguage.json
{
"scopeName": "text.html.markdown",
"patterns": [
{ "include": "#headings" }],
"repository": {
"headings": {
"patterns": [
{ "include": "#symbol" },
{ "include": "#text" }]},
"symbol": {
"match": "*s2",
"name": "symbol.letter.number.headings.md" },
"text": {
"match": "Description 12345",
"name": "text.description.headings.md" }
}
}