mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
Highlight dots in variables
This commit is contained in:
parent
ea921aca5d
commit
cdb9867e0d
@ -171,19 +171,19 @@
|
|||||||
{
|
{
|
||||||
"comment": "Function name",
|
"comment": "Function name",
|
||||||
"name": "entity.name.function.typst",
|
"name": "entity.name.function.typst",
|
||||||
"match": "((#)[[:alpha:]_][[:alnum:]_-]*!?)(?=\\[|\\()",
|
"match": "((#)[[:alpha:]_][[:alnum:]._-]*!?)(?=\\[|\\()",
|
||||||
"captures": { "2": { "name": "punctuation.definition.function.typst" } }
|
"captures": { "2": { "name": "punctuation.definition.function.typst" } }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"comment": "Function arguments",
|
"comment": "Function arguments",
|
||||||
"begin": "(?<=#[[:alpha:]_][[:alnum:]_-]*!?)\\(",
|
"begin": "(?<=#[[:alpha:]_][[:alnum:]._-]*!?)\\(",
|
||||||
"end": "\\)",
|
"end": "\\)",
|
||||||
"captures": { "0": { "name": "punctuation.definition.group.typst" } },
|
"captures": { "0": { "name": "punctuation.definition.group.typst" } },
|
||||||
"patterns": [{ "include": "#arguments" }]
|
"patterns": [{ "include": "#arguments" }]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "variable.interpolated.typst",
|
"name": "variable.interpolated.typst",
|
||||||
"match": "(#)[[:alpha:]_][[:alnum:]_-]*",
|
"match": "(#)[[:alpha:]_][[:alnum:]._-]*",
|
||||||
"captures": { "1": { "name": "punctuation.definition.variable.typst" } }
|
"captures": { "1": { "name": "punctuation.definition.variable.typst" } }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -219,7 +219,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "keyword.operator.arithmetic.typst",
|
"name": "keyword.operator.arithmetic.typst",
|
||||||
"match": "\\+|\\*|/|(?<![[:alpha:]_][[:alnum:]_-]*)-(?![:alnum:]_-]*[[:alpha:]_])"
|
"match": "\\+|\\*|/|(?<![[:alpha:]_][[:alnum:]._-]*)-(?![:alnum:]_-]*[[:alpha:]_])"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "keyword.operator.word.typst",
|
"name": "keyword.operator.word.typst",
|
||||||
@ -237,18 +237,18 @@
|
|||||||
{
|
{
|
||||||
"comment": "Function name",
|
"comment": "Function name",
|
||||||
"name": "entity.name.function.typst",
|
"name": "entity.name.function.typst",
|
||||||
"match": "\\b[[:alpha:]_][[:alnum:]_-]*!?(?=(\\[|\\()|\\s+\\bwith\\b)"
|
"match": "\\b[[:alpha:]_][[:alnum:]._-]*!?(?=(\\[|\\()|\\s+\\bwith\\b)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"comment": "Function arguments",
|
"comment": "Function arguments",
|
||||||
"begin": "(?<=\\b[[:alpha:]_][[:alnum:]_-]*!?|\\bwith\\b\\s+)\\(",
|
"begin": "(?<=\\b[[:alpha:]_][[:alnum:]._-]*!?|\\bwith\\b\\s+)\\(",
|
||||||
"end": "\\)",
|
"end": "\\)",
|
||||||
"captures": { "0": { "name": "punctuation.definition.group.typst" } },
|
"captures": { "0": { "name": "punctuation.definition.group.typst" } },
|
||||||
"patterns": [{ "include": "#arguments" }]
|
"patterns": [{ "include": "#arguments" }]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "variable.other.typst",
|
"name": "variable.other.typst",
|
||||||
"match": "\\b[[:alpha:]_][[:alnum:]_-]*\\b"
|
"match": "\\b[[:alpha:]_][[:alnum:]._-]*\\b"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "meta.group.typst",
|
"name": "meta.group.typst",
|
||||||
@ -317,7 +317,7 @@
|
|||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"name": "variable.parameter.typst",
|
"name": "variable.parameter.typst",
|
||||||
"match": "\\b[[:alpha:]_][[:alnum:]_-]*(?=:)"
|
"match": "\\b[[:alpha:]_][[:alnum:]._-]*(?=:)"
|
||||||
},
|
},
|
||||||
{ "include": "#code" }
|
{ "include": "#code" }
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user