Browse Source

Escape character syntax support

pull/165/head
Ionite 1 year ago
parent
commit
5378f8de2c
No known key found for this signature in database
  1. 26
      StabilityMatrix.Avalonia/Assets/ImagePrompt.tmLanguage.json
  2. 16
      StabilityMatrix.Avalonia/Assets/ThemeMatrixDark.json

26
StabilityMatrix.Avalonia/Assets/ImagePrompt.tmLanguage.json

@ -16,6 +16,27 @@
"match": "(#).*$\\n?",
"name": "comment.line.number-sign.prompt"
},
"escape": {
"begin": "\\\\",
"beginCaptures": {
"0": {
"name": "constant.character.escape.prompt"
}
},
"end": "[-+.!(){}\\[\\]<\\>]",
"endCaptures": {
"0": {
"name": "constant.character.escape.target.prompt"
}
},
"name": "meta.structure.escape.prompt",
"patterns": [
{
"match": "[^-+.!(){}\\[\\]<\\>]",
"name": "invalid.illegal.escape.prompt"
}
]
},
"parenthesized": {
"begin": "\\(",
"beginCaptures": {
@ -121,7 +142,7 @@
"name": "meta.embedded.whitespace"
},
"text": {
"match": "[^,:\\[\\]\\(\\) ]+",
"match": "[^,:\\[\\]\\(\\) \\\\]+",
"name": "meta.embedded"
},
"value": {
@ -129,6 +150,9 @@
{
"include": "#comment"
},
{
"include": "#escape"
},
{
"include": "#parenthesized"
},

16
StabilityMatrix.Avalonia/Assets/ThemeMatrixDark.json

@ -116,6 +116,22 @@
"foreground": "#408080"
}
},
{
"name": "Escape character",
"scope": "constant.character.escape",
"settings": {
"fontStyle": "",
"foreground": "#408080"
}
},
{
"name": "Escape sequence target",
"scope": "constant.character.escape.target",
"settings": {
"fontStyle": "",
"foreground": "#C5C8C6"
}
},
{
"name": "User-defined constant",
"scope": "constant.character, constant.other",

Loading…
Cancel
Save