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",
|
||||
"name": "entity.name.function.typst",
|
||||
"match": "((#)[[:alpha:]_][[:alnum:]_-]*!?)(?=\\[|\\()",
|
||||
"match": "((#)[[:alpha:]_][[:alnum:]._-]*!?)(?=\\[|\\()",
|
||||
"captures": { "2": { "name": "punctuation.definition.function.typst" } }
|
||||
},
|
||||
{
|
||||
"comment": "Function arguments",
|
||||
"begin": "(?<=#[[:alpha:]_][[:alnum:]_-]*!?)\\(",
|
||||
"begin": "(?<=#[[:alpha:]_][[:alnum:]._-]*!?)\\(",
|
||||
"end": "\\)",
|
||||
"captures": { "0": { "name": "punctuation.definition.group.typst" } },
|
||||
"patterns": [{ "include": "#arguments" }]
|
||||
},
|
||||
{
|
||||
"name": "variable.interpolated.typst",
|
||||
"match": "(#)[[:alpha:]_][[:alnum:]_-]*",
|
||||
"match": "(#)[[:alpha:]_][[:alnum:]._-]*",
|
||||
"captures": { "1": { "name": "punctuation.definition.variable.typst" } }
|
||||
}
|
||||
]
|
||||
@ -219,7 +219,7 @@
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.arithmetic.typst",
|
||||
"match": "\\+|\\*|/|(?<![[:alpha:]_][[:alnum:]_-]*)-(?![:alnum:]_-]*[[:alpha:]_])"
|
||||
"match": "\\+|\\*|/|(?<![[:alpha:]_][[:alnum:]._-]*)-(?![:alnum:]_-]*[[:alpha:]_])"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.word.typst",
|
||||
@ -237,18 +237,18 @@
|
||||
{
|
||||
"comment": "Function name",
|
||||
"name": "entity.name.function.typst",
|
||||
"match": "\\b[[:alpha:]_][[:alnum:]_-]*!?(?=(\\[|\\()|\\s+\\bwith\\b)"
|
||||
"match": "\\b[[:alpha:]_][[:alnum:]._-]*!?(?=(\\[|\\()|\\s+\\bwith\\b)"
|
||||
},
|
||||
{
|
||||
"comment": "Function arguments",
|
||||
"begin": "(?<=\\b[[:alpha:]_][[:alnum:]_-]*!?|\\bwith\\b\\s+)\\(",
|
||||
"begin": "(?<=\\b[[:alpha:]_][[:alnum:]._-]*!?|\\bwith\\b\\s+)\\(",
|
||||
"end": "\\)",
|
||||
"captures": { "0": { "name": "punctuation.definition.group.typst" } },
|
||||
"patterns": [{ "include": "#arguments" }]
|
||||
},
|
||||
{
|
||||
"name": "variable.other.typst",
|
||||
"match": "\\b[[:alpha:]_][[:alnum:]_-]*\\b"
|
||||
"match": "\\b[[:alpha:]_][[:alnum:]._-]*\\b"
|
||||
},
|
||||
{
|
||||
"name": "meta.group.typst",
|
||||
@ -317,7 +317,7 @@
|
||||
"patterns": [
|
||||
{
|
||||
"name": "variable.parameter.typst",
|
||||
"match": "\\b[[:alpha:]_][[:alnum:]_-]*(?=:)"
|
||||
"match": "\\b[[:alpha:]_][[:alnum:]._-]*(?=:)"
|
||||
},
|
||||
{ "include": "#code" }
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user