mirror of
https://github.com/enso-org/enso.git
synced 2024-12-29 21:13:10 +03:00
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:
parent
5dc2c4c5fd
commit
d078a37a6a
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user