mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Refresh TextMate grammar
This commit is contained in:
parent
abafb39041
commit
9db89b376d
@ -389,7 +389,7 @@ impl Category {
|
|||||||
Self::Math => "string.other.math.typst",
|
Self::Math => "string.other.math.typst",
|
||||||
Self::Heading => "markup.heading.typst",
|
Self::Heading => "markup.heading.typst",
|
||||||
Self::List => "markup.list.typst",
|
Self::List => "markup.list.typst",
|
||||||
Self::Term => "markup.bold.typst",
|
Self::Term => "markup.list.term.typst",
|
||||||
Self::Label => "entity.name.label.typst",
|
Self::Label => "entity.name.label.typst",
|
||||||
Self::Ref => "markup.other.reference.typst",
|
Self::Ref => "markup.other.reference.typst",
|
||||||
Self::Keyword => "keyword.typst",
|
Self::Keyword => "keyword.typst",
|
||||||
|
@ -48,6 +48,30 @@
|
|||||||
"name": "constant.character.escape.content.typst",
|
"name": "constant.character.escape.content.typst",
|
||||||
"match": "\\\\([\\\\/\\[\\]{}#*_=~`$-.]|u\\{[0-9a-zA-Z]*\\}?)"
|
"match": "\\\\([\\\\/\\[\\]{}#*_=~`$-.]|u\\{[0-9a-zA-Z]*\\}?)"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "punctuation.definition.linebreak.typst",
|
||||||
|
"match": "\\\\"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "punctuation.definition.nonbreaking-space.typst",
|
||||||
|
"match": "~"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "punctuation.definition.shy.typst",
|
||||||
|
"match": "-\\?"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "punctuation.definition.em-dash.typst",
|
||||||
|
"match": "---"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "punctuation.definition.en-dash.typst",
|
||||||
|
"match": "--"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "punctuation.definition.ellipsis.typst",
|
||||||
|
"match": "\\.\\.\\."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "markup.bold.typst",
|
"name": "markup.bold.typst",
|
||||||
"begin": "(^\\*|\\*$|((?<=\\W|_)\\*)|(\\*(?=\\W|_)))",
|
"begin": "(^\\*|\\*$|((?<=\\W|_)\\*)|(\\*(?=\\W|_)))",
|
||||||
@ -63,20 +87,26 @@
|
|||||||
"patterns": [{ "include": "#markup" }]
|
"patterns": [{ "include": "#markup" }]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "punctuation.definition.linebreak.typst",
|
"name": "markup.underline.link.typst",
|
||||||
"match": "\\\\"
|
"match": "https?://[0-9a-zA-Z~/%#&=',;\\.\\+\\?]*"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "punctuation.definition.em-dash.typst",
|
"name": "markup.raw.block.typst",
|
||||||
"match": "---"
|
"begin": "`{3,}",
|
||||||
|
"end": "\\0",
|
||||||
|
"captures": { "0": { "name": "punctuation.definition.raw.typst" } }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "punctuation.definition.en-dash.typst",
|
"name": "markup.raw.inline.typst",
|
||||||
"match": "--"
|
"begin": "`",
|
||||||
|
"end": "`",
|
||||||
|
"captures": { "0": { "name": "punctuation.definition.raw.typst" } }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "punctuation.definition.nonbreaking-space.typst",
|
"name": "string.other.math.typst",
|
||||||
"match": "~"
|
"begin": "\\$",
|
||||||
|
"end": "\\$",
|
||||||
|
"captures": { "0": { "name": "punctuation.defintion.string.math.typst" } }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "markup.heading.typst",
|
"name": "markup.heading.typst",
|
||||||
@ -92,42 +122,25 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "punctuation.definition.list.numbered.typst",
|
"name": "punctuation.definition.list.numbered.typst",
|
||||||
"match": "^\\s*[0-9]*\\.\\s+"
|
"match": "^\\s*([0-9]*\\.|\\+)\\s+"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "markup.raw.block.typst",
|
"match": "^\\s*(/)\\s+([^:]*:)",
|
||||||
"begin": "`{3,}",
|
"captures": {
|
||||||
"end": "\\0",
|
"1": { "name": "punctuation.definition.list.description.typst" },
|
||||||
"captures": { "0": { "name": "punctuation.definition.raw.typst" } }
|
"2": { "name": "markup.list.term.typst" }
|
||||||
},
|
}
|
||||||
{
|
|
||||||
"name": "markup.raw.inline.typst",
|
|
||||||
"begin": "`",
|
|
||||||
"end": "`",
|
|
||||||
"captures": { "0": { "name": "punctuation.definition.raw.typst" } }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "string.other.math.block.typst",
|
|
||||||
"begin": "\\$\\[",
|
|
||||||
"end": "\\]\\$",
|
|
||||||
"captures": { "0": { "name": "punctuation.defintion.string.math.typst" } }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "string.other.math.typst",
|
|
||||||
"begin": "\\$",
|
|
||||||
"end": "\\$",
|
|
||||||
"captures": { "0": { "name": "punctuation.defintion.string.math.typst" } }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "entity.other.reference.typst",
|
|
||||||
"match": "(@)[[:alpha:]_][[:alnum:]_-]*",
|
|
||||||
"captures": { "1": { "name": "punctuation.definition.reference.typst" } }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "entity.other.label.typst",
|
"name": "entity.other.label.typst",
|
||||||
"match": "<[[:alpha:]_][[:alnum:]_-]*>",
|
"match": "<[[:alpha:]_][[:alnum:]_-]*>",
|
||||||
"captures": { "1": { "name": "punctuation.definition.label.typst" } }
|
"captures": { "1": { "name": "punctuation.definition.label.typst" } }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "entity.other.reference.typst",
|
||||||
|
"match": "(@)[[:alpha:]_][[:alnum:]_-]*",
|
||||||
|
"captures": { "1": { "name": "punctuation.definition.reference.typst" } }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"begin": "(#)(pub|let|set|show|wrap)\\b",
|
"begin": "(#)(pub|let|set|show|wrap)\\b",
|
||||||
"end": "\n|(;)|(?=])",
|
"end": "\n|(;)|(?=])",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user