Skip to content

Commit

Permalink
Better syntax highlighting for fmt strings
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Jan 9, 2025
1 parent a2d583f commit 0f6a8e6
Showing 1 changed file with 42 additions and 7 deletions.
49 changes: 42 additions & 7 deletions syntaxes/noir.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,52 @@
]
},
"strings": {
"name": "string.quoted.double.nr",
"begin": "\"",
"end": "\"",
"patterns": [{
"include": "#escapes"
}]
"patterns": [
{
"name": "string.quoted.double.nr",
"begin": "\"",
"end": "\"",
"patterns": [
{
"include": "#string-escapes"
}
]
},
{
"name": "string.interpolated.nr",
"begin": "f\"",
"end": "\"",
"patterns": [
{
"include": "#interpolated-string-escapes"
},
{
"include": "#interpolations"
}
]
}
]
},
"escapes": {
"string-escapes": {
"name": "constant.character.escape.nr",
"match": "\\\\."
},
"interpolated-string-escapes": {
"name": "constant.character.escape.nr",
"match": "\\\\.|{{|}}"
},
"interpolations": {
"match": "({)[^\"{}]*(})",
"name": "variable.other.nr",
"captures": {
"1": {
"name": "constant.character.nr"
},
"2": {
"name": "constant.character.nr"
}
}
},
"numeric": {
"patterns": [
{
Expand Down

0 comments on commit 0f6a8e6

Please sign in to comment.