Fix highlighting of arguments in code 🎨

This commit is contained in:
Laurenz 2021-03-02 15:37:16 +01:00
parent aaada5b69c
commit 36adbe4b80

View File

@ -197,7 +197,7 @@
"comment": "Function arguments", "comment": "Function arguments",
"begin": "(?<=#[[:alpha:]_][[:alnum:]_-]*)\\(", "begin": "(?<=#[[:alpha:]_][[:alnum:]_-]*)\\(",
"end": "\\)", "end": "\\)",
"captures": { "3": { "name": "punctuation.definition.group.typst" } }, "captures": { "0": { "name": "punctuation.definition.group.typst" } },
"patterns": [{ "include": "#arguments" }] "patterns": [{ "include": "#arguments" }]
}, },
{ {
@ -210,13 +210,6 @@
"code": { "code": {
"patterns": [ "patterns": [
{ "include": "#common" }, { "include": "#common" },
{
"name": "meta.group.typst",
"begin": "\\(",
"end": "\\)|(?=;)",
"captures": { "0": { "name": "punctuation.definition.group.typst" } },
"patterns": [{ "include": "#code" }]
},
{ {
"name": "punctuation.separator.colon.typst", "name": "punctuation.separator.colon.typst",
"match": ":" "match": ":"
@ -269,6 +262,13 @@
{ {
"name": "variable.other.typst", "name": "variable.other.typst",
"match": "\\b[[:alpha:]_][[:alnum:]_-]*\\b" "match": "\\b[[:alpha:]_][[:alnum:]_-]*\\b"
},
{
"name": "meta.group.typst",
"begin": "\\(",
"end": "\\)|(?=;)",
"captures": { "0": { "name": "punctuation.definition.group.typst" } },
"patterns": [{ "include": "#code" }]
} }
] ]
}, },