Skip to content

Commit

Permalink
fix: keywords are highlighted incorrectly in objects/structs (#6223)
Browse files Browse the repository at this point in the history
Fixes #6208
Fixes #2595

Before:
<img width="387" alt="image" src="https://github.com/winglang/wing/assets/1237390/b298340c-f855-471e-a496-b71706c79190">



After:
<img width="407" alt="image" src="https://github.com/winglang/wing/assets/1237390/85e85809-01b1-4e54-beea-a4c115cead1e">


*By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
  • Loading branch information
MarkMcCulloh authored Apr 12, 2024
1 parent 39569f0 commit 60bc255
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions apps/vscode-wing/syntaxes/wing.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
{
"include": "#template-string"
},
{
"include": "#object-keys"
},
{
"include": "#members"
},
{
"include": "#keywords"
},
Expand All @@ -23,9 +29,6 @@
},
{
"include": "#identifiers"
},
{
"include": "#members"
}
],
"repository": {
Expand Down Expand Up @@ -188,6 +191,18 @@
}
}
]
},
"object-keys": {
"patterns": [
{
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\s*:",
"captures": {
"1": {
"name": "variable.wing"
}
}
}
]
}
}
}

0 comments on commit 60bc255

Please sign in to comment.