mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
Highlight set
, show
and wrap
This commit is contained in:
parent
3968181622
commit
5e34c81a01
@ -88,18 +88,6 @@
|
|||||||
"name": "punctuation.definition.list.numbered.typst",
|
"name": "punctuation.definition.list.numbered.typst",
|
||||||
"match": "^\\s*[0-9]*\\.\\s+"
|
"match": "^\\s*[0-9]*\\.\\s+"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"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": "markup.raw.block.typst",
|
"name": "markup.raw.block.typst",
|
||||||
"begin": "`{3,}",
|
"begin": "`{3,}",
|
||||||
@ -113,18 +101,20 @@
|
|||||||
"captures": { "0": { "name": "punctuation.definition.raw.typst" } }
|
"captures": { "0": { "name": "punctuation.definition.raw.typst" } }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "keyword.control.typst",
|
"name": "string.other.math.block.typst",
|
||||||
"match": "(#)(break|continue|return)\\b",
|
"begin": "\\$\\[",
|
||||||
"captures": { "1": { "name": "punctuation.definition.keyword.typst" } }
|
"end": "\\]\\$",
|
||||||
|
"captures": { "0": { "name": "punctuation.defintion.string.math.typst" } }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "keyword.other.typst",
|
"name": "string.other.math.typst",
|
||||||
"match": "(#)(as|in|with|from)\\b",
|
"begin": "\\$",
|
||||||
"captures": { "1": { "name": "punctuation.definition.keyword.typst" } }
|
"end": "\\$",
|
||||||
|
"captures": { "0": { "name": "punctuation.defintion.string.math.typst" } }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"begin": "(#)(pub|let)\\b",
|
"begin": "(#)(pub|let|set|show|wrap)\\b",
|
||||||
"end": "\n|(;)|(?=])|(?<=}|])",
|
"end": "\n|(;)|(?=])",
|
||||||
"beginCaptures": {
|
"beginCaptures": {
|
||||||
"0": { "name": "keyword.other.typst" },
|
"0": { "name": "keyword.other.typst" },
|
||||||
"1": { "name": "punctuation.definition.keyword.typst" }
|
"1": { "name": "punctuation.definition.keyword.typst" }
|
||||||
@ -132,6 +122,11 @@
|
|||||||
"endCaptures": { "1": { "name": "punctuation.terminator.statement.typst" } },
|
"endCaptures": { "1": { "name": "punctuation.terminator.statement.typst" } },
|
||||||
"patterns": [{ "include": "#code" }]
|
"patterns": [{ "include": "#code" }]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.other.typst",
|
||||||
|
"match": "(#)(as|in|with|from)\\b",
|
||||||
|
"captures": { "1": { "name": "punctuation.definition.keyword.typst" } }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"begin": "((#)if|(?<=(}|])\\s*)else)\\b",
|
"begin": "((#)if|(?<=(}|])\\s*)else)\\b",
|
||||||
"end": "\n|(?=])|(?<=}|])",
|
"end": "\n|(?=])|(?<=}|])",
|
||||||
@ -145,28 +140,30 @@
|
|||||||
"begin": "(#)(for|while)\\b",
|
"begin": "(#)(for|while)\\b",
|
||||||
"end": "\n|(?=])|(?<=}|])",
|
"end": "\n|(?=])|(?<=}|])",
|
||||||
"beginCaptures": {
|
"beginCaptures": {
|
||||||
"0": { "name": "keyword.control.typst" },
|
"0": { "name": "keyword.control.loop.typst" },
|
||||||
"1": { "name": "punctuation.definition.keyword.typst" }
|
"1": { "name": "punctuation.definition.keyword.typst" }
|
||||||
},
|
},
|
||||||
"patterns": [{ "include": "#code" }]
|
"patterns": [{ "include": "#code" }]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"begin": "(#)import\\b",
|
"name": "keyword.control.loop.typst",
|
||||||
"end": "\n|(?=])",
|
"match": "(#)(break|continue)\\b",
|
||||||
|
"captures": { "1": { "name": "punctuation.definition.keyword.typst" } }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"begin": "(#)(import|include)\\b",
|
||||||
|
"end": "\n|(;)|(?=])",
|
||||||
"beginCaptures": {
|
"beginCaptures": {
|
||||||
"0": { "name": "keyword.control.import.typst" },
|
"0": { "name": "keyword.control.import.typst" },
|
||||||
"1": { "name": "punctuation.definition.keyword.typst" }
|
"1": { "name": "punctuation.definition.keyword.typst" }
|
||||||
},
|
},
|
||||||
|
"endCaptures": { "1": { "name": "punctuation.terminator.statement.typst" } },
|
||||||
"patterns": [{ "include": "#code" }]
|
"patterns": [{ "include": "#code" }]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"begin": "(#)include\\b",
|
"name": "keyword.control.flow.typst",
|
||||||
"end": "\n|(?=])",
|
"match": "(#)(return)\\b",
|
||||||
"beginCaptures": {
|
"captures": { "1": { "name": "punctuation.definition.keyword.typst" } }
|
||||||
"0": { "name": "keyword.control.include.typst" },
|
|
||||||
"1": { "name": "punctuation.definition.keyword.typst" }
|
|
||||||
},
|
|
||||||
"patterns": [{ "include": "#code" }]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"comment": "Function name",
|
"comment": "Function name",
|
||||||
@ -226,12 +223,24 @@
|
|||||||
"match": "\\b(and|or|not)\\b"
|
"match": "\\b(and|or|not)\\b"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "keyword.control.typst",
|
"name": "keyword.other.typst",
|
||||||
"match": "\\b(if|else|for|while|break|continue|return)\\b"
|
"match": "\\b(pub|let|set|show|wrap|as|in|with|from)\\b"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "keyword.other.typst",
|
"name": "keyword.control.conditional.typst",
|
||||||
"match": "\\b(pub|let|as|in|with|import|include|from)\\b"
|
"match": "\\b(if|else)\\b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.control.loop.typst",
|
||||||
|
"match": "\\b(for|while|break|continue)\\b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.control.import.typst",
|
||||||
|
"match": "\\b(import|include)\\b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.control.flow.typst",
|
||||||
|
"match": "\\b(return)\\b"
|
||||||
},
|
},
|
||||||
{ "include": "#constants" },
|
{ "include": "#constants" },
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user