Files
marqdo/vscode-extension/syntaxes/marqdo.tmLanguage.json
T
cflmyandCursor f4f798a4d0 Bootstrap VS Code extension workspace and development norms.
Add Marqdo language registration, TextMate grammar stub, and docs for the vscode-extension branch workflow.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 16:26:33 +08:00

90 lines
2.5 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "Marqdo",
"scopeName": "source.marqdo",
"patterns": [
{ "include": "#frontmatter" },
{ "include": "#heading" },
{ "include": "#hr-end" },
{ "include": "#call" },
{ "include": "#return" },
{ "include": "#empty-return" },
{ "include": "#statement" },
{ "include": "#list-structure" },
{ "include": "#table" },
{ "include": "#code-fence" },
{ "include": "#comment" }
],
"repository": {
"frontmatter": {
"name": "meta.embedded.block.frontmatter.marqdo",
"begin": "\\A---\\s*$",
"end": "^---\\s*$",
"patterns": [
{ "name": "keyword.control.import.marqdo", "match": "^\\s*>\\s+.+$" },
{ "name": "string.unquoted.frontmatter.marqdo", "match": "^.+$" }
]
},
"heading": {
"name": "markup.heading.marqdo",
"match": "^(#{1,6})\\s+(.+)$",
"captures": {
"1": { "name": "punctuation.definition.heading.marqdo" },
"2": { "name": "entity.name.function.marqdo" }
}
},
"hr-end": {
"name": "keyword.control.function.end.marqdo",
"match": "^(---+|\\*{3,})\\s*$"
},
"call": {
"name": "meta.call.marqdo",
"match": "^(\\s*)(>)\\s+(\\S+)(.*)$",
"captures": {
"2": { "name": "keyword.operator.call.marqdo" },
"3": { "name": "entity.name.function.call.marqdo" },
"4": { "name": "meta.call.args.marqdo" }
}
},
"empty-return": {
"name": "keyword.control.return.empty.marqdo",
"match": "^\\s*(\\*{4}|\\*\\*\\s+\\*\\*)\\s*$"
},
"return": {
"name": "meta.return.marqdo",
"begin": "\\*\\*",
"end": "\\*\\*",
"name": "markup.bold.return.marqdo",
"patterns": [
{ "name": "variable.other.marqdo", "match": "`[^`]+`" }
]
},
"statement": {
"name": "meta.statement.marqdo",
"begin": "(?<!\\*)\\*(?!\\*)",
"end": "(?<!\\*)\\*(?!\\*)",
"name": "markup.italic.statement.marqdo"
},
"list-structure": {
"name": "markup.list.marqdo",
"match": "^(\\s*)([-+]|\\d+\\.)\\s+"
},
"table": {
"name": "markup.table.marqdo",
"match": "^\\s*\\|.*\\|\\s*$"
},
"code-fence": {
"name": "markup.fenced_code.block.marqdo",
"begin": "^\\s*```([\\w+-]*)\\s*$",
"end": "^\\s*```\\s*$",
"beginCaptures": {
"1": { "name": "entity.name.tag.lang.marqdo" }
}
},
"comment": {
"name": "comment.line.marqdo",
"match": "^.+$"
}
}
}