Skip to content

Commit

Permalink
fix: raw string syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
rszyma committed Aug 11, 2024
1 parent d1f5fea commit 77da3f1
Showing 1 changed file with 29 additions and 36 deletions.
65 changes: 29 additions & 36 deletions syntaxes/kanata.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,48 +147,41 @@
}
},
{
"begin": "\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end"
}
},
"name": "string.quoted.double",
"patterns": [
{
"match": "(\\[abtnre0\"|\\\\])",
"name": "constant.character.escape.kanata"
},
{
"match": "(\\[^abtnre0\"|\\\\])",
"name": "invalid.illegal.escape.kanata"
}
]
"include": "#strings"
}
],
"repository": {
"keywords": {
"patterns": [
{
"name": "keyword.control.kanata",
"match": "\\b(-{3,})\\b"
}
]
},
"strings": {
"name": "string.quoted.double.kanata",
"begin": "\"",
"end": "\"",
"patterns": [
{
"name": "constant.character.escape.kanata",
"match": "\\\\."
"name": "string.quoted.double.kanata",
"begin": "\"",
"end": "\""
},
{
"comment": "rust-style raw strings",
"name": "string.quoted.double.kanata",
"begin": "(r)(#)(\")",
"beginCaptures": {
"1": {
"name": "string.quoted.byte.raw.kanata"
},
"2": {
"name": "punctuation.definition.string.raw.kanata"
},
"3": {
"name": "punctuation.definition.string.kanata"
}
},
"end": "(\")(\\2)",
"endCaptures": {
"1": {
"name": "punctuation.definition.string.kanata"
},
"2": {
"name": "punctuation.definition.string.raw.kanata"
}
}
}
]
}
Expand Down

0 comments on commit 77da3f1

Please sign in to comment.