Update the Enso grammar in the VS Code extension (#7625)

Following up on #7539 which introduced great improvements to the Enso grammar, I add some more to try to make it even better.

- Changing to highlight `self` instead of `this` (as the keyword was renamed a long time ago).
- Trying to include the string quotes to be highlighted as part of the string - a bit more controversial but IMO it looks more consistent with simple literals.

Before:
![image](https://github.com/enso-org/enso/assets/1436948/7d455c22-042a-4b43-a603-d661190aa7a4)

After:
![image](https://github.com/enso-org/enso/assets/1436948/5bfab6c0-ad67-4302-b5d3-0ef2fce232a9)
This commit is contained in:
Radosław Waśko 2023-08-22 16:20:02 +02:00 committed by GitHub
parent 5dc2c4c5fd
commit d078a37a6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@
"keywords": {
"patterns": [{
"name": "keyword.other",
"match": "\\b(here|this|type)\\b"
"match": "\\b(self|type)\\b"
}, {
"name": "keyword.control",
"match": "\\b(case|of|if|then|else)\\b"
@ -88,12 +88,22 @@
{
"contentName": "string.quoted.triple.begin",
"begin": "^(\\s*)(\"\"\"|''')",
"end": "^(?!\\1\\s+)(?!\\s*$)"
"end": "^(?!\\1\\s+)(?!\\s*$)",
"beginCaptures": {
"2": {
"name": "string.quoted.triple.begin"
}
}
},
{
"contentName": "string.quoted.triple.middle",
"begin": "^(\\s*)[^\\s].*(\"\"\"|''')",
"end": "^(?!\\1\\s+)(?!\\s*$)"
"end": "^(?!\\1\\s+)(?!\\s*$)",
"beginCaptures": {
"2": {
"name": "string.quoted.triple.begin"
}
}
},
{
"name": "string.quoted.single",