-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add inline syntax highlighting support for Lua (#105)
* Add lua grammar * For some reason tsconfig needs to be included or punctuation highlights are missing * Never mind it was just flaky * Support comment tagged string syntax * chore: add changeset --------- Co-authored-by: Alessia Bellisario <[email protected]>
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"vscode-apollo": minor | ||
--- | ||
|
||
Add inline syntax highlighting support for Lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"fileTypes": ["lua", "luau"], | ||
"injectionSelector": "L:source -string -comment", | ||
"patterns": [ | ||
{ | ||
"contentName": "meta.embedded.block.graphql", | ||
"begin": "(--\\[\\[)\\s*(gql)\\s*(\\]\\])\\s*(\\[\\[)", | ||
"beginCaptures": { | ||
"1": { | ||
"name": "comment.block.lua" | ||
}, | ||
"2": { | ||
"name": "entity.name.function.lua" | ||
}, | ||
"3": { | ||
"name": "comment.block.lua" | ||
}, | ||
"4": { | ||
"name": "string.quoted.double.lua" | ||
} | ||
}, | ||
"end": "(\\]\\])", | ||
"endCaptures": { | ||
"1": { | ||
"name": "string.quoted.double.lua" | ||
} | ||
}, | ||
"patterns": [{ "include": "source.graphql" }] | ||
}, | ||
{ | ||
"contentName": "meta.embedded.block.graphql", | ||
"begin": "(gql)\\(?\\s*(\\[\\[)", | ||
"beginCaptures": { | ||
"1": { | ||
"name": "entity.name.function.lua" | ||
}, | ||
"2": { | ||
"name": "string.quoted.double.lua" | ||
} | ||
}, | ||
"end": "(\\]\\])", | ||
"endCaptures": { | ||
"1": { | ||
"name": "string.quoted.double.lua" | ||
} | ||
}, | ||
"patterns": [{ "include": "source.graphql" }] | ||
} | ||
], | ||
"scopeName": "inline.graphql.lua" | ||
} |