diff options
Diffstat (limited to 'tools/support/typst.tmLanguage.json')
| -rw-r--r-- | tools/support/typst.tmLanguage.json | 77 |
1 files changed, 45 insertions, 32 deletions
diff --git a/tools/support/typst.tmLanguage.json b/tools/support/typst.tmLanguage.json index f493cc5b..7a1c8458 100644 --- a/tools/support/typst.tmLanguage.json +++ b/tools/support/typst.tmLanguage.json @@ -49,22 +49,16 @@ "match": "\\\\([\\\\/\\[\\]{}#*_=~`$-.]|u\\{[0-9a-zA-Z]*\\}?)" }, { - "name": "markup.bold.typst", - "begin": "(^\\*|\\*$|((?<=\\W|_)\\*)|(\\*(?=\\W|_)))", - "end": "(^\\*|\\*$|((?<=\\W|_)\\*)|(\\*(?=\\W|_)))|\n|(?=\\])", - "captures": { "0": { "name": "punctuation.definition.bold.typst" } }, - "patterns": [{ "include": "#markup" }] + "name": "punctuation.definition.linebreak.typst", + "match": "\\\\" }, { - "name": "markup.italic.typst", - "begin": "(^_|_$|((?<=\\W|_)_)|(_(?=\\W|_)))", - "end": "(^_|_$|((?<=\\W|_)_)|(_(?=\\W|_)))|\n|(?=\\])", - "captures": { "0": { "name": "punctuation.definition.italic.typst" } }, - "patterns": [{ "include": "#markup" }] + "name": "punctuation.definition.nonbreaking-space.typst", + "match": "~" }, { - "name": "punctuation.definition.linebreak.typst", - "match": "\\\\" + "name": "punctuation.definition.shy.typst", + "match": "-\\?" }, { "name": "punctuation.definition.em-dash.typst", @@ -75,24 +69,26 @@ "match": "--" }, { - "name": "punctuation.definition.nonbreaking-space.typst", - "match": "~" + "name": "punctuation.definition.ellipsis.typst", + "match": "\\.\\.\\." }, { - "name": "markup.heading.typst", - "contentName": "entity.name.section.typst", - "begin": "^\\s*=+\\s+", - "end": "\n|(?=<)", - "beginCaptures": { "0": { "name": "punctuation.definition.heading.typst" } }, + "name": "markup.bold.typst", + "begin": "(^\\*|\\*$|((?<=\\W|_)\\*)|(\\*(?=\\W|_)))", + "end": "(^\\*|\\*$|((?<=\\W|_)\\*)|(\\*(?=\\W|_)))|\n|(?=\\])", + "captures": { "0": { "name": "punctuation.definition.bold.typst" } }, "patterns": [{ "include": "#markup" }] }, { - "name": "punctuation.definition.list.unnumbered.typst", - "match": "^\\s*-\\s+" + "name": "markup.italic.typst", + "begin": "(^_|_$|((?<=\\W|_)_)|(_(?=\\W|_)))", + "end": "(^_|_$|((?<=\\W|_)_)|(_(?=\\W|_)))|\n|(?=\\])", + "captures": { "0": { "name": "punctuation.definition.italic.typst" } }, + "patterns": [{ "include": "#markup" }] }, { - "name": "punctuation.definition.list.numbered.typst", - "match": "^\\s*[0-9]*\\.\\s+" + "name": "markup.underline.link.typst", + "match": "https?://[0-9a-zA-Z~/%#&=',;\\.\\+\\?]*" }, { "name": "markup.raw.block.typst", @@ -107,21 +103,33 @@ "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": "markup.heading.typst", + "contentName": "entity.name.section.typst", + "begin": "^\\s*=+\\s+", + "end": "\n|(?=<)", + "beginCaptures": { "0": { "name": "punctuation.definition.heading.typst" } }, + "patterns": [{ "include": "#markup" }] + }, + { + "name": "punctuation.definition.list.unnumbered.typst", + "match": "^\\s*-\\s+" + }, + { + "name": "punctuation.definition.list.numbered.typst", + "match": "^\\s*([0-9]*\\.|\\+)\\s+" + }, + { + "match": "^\\s*(/)\\s+([^:]*:)", + "captures": { + "1": { "name": "punctuation.definition.list.description.typst" }, + "2": { "name": "markup.list.term.typst" } + } }, { "name": "entity.other.label.typst", @@ -129,6 +137,11 @@ "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", "end": "\n|(;)|(?=])", "beginCaptures": { |
