generated from tree-sitter-grammars/template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add highlight & injection queries
- Loading branch information
1 parent
f9cc060
commit 222397a
Showing
6 changed files
with
496 additions
and
435 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
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 |
---|---|---|
@@ -1 +1,24 @@ | ||
; TODO: add highlight queries here | ||
(name) @markup.heading | ||
|
||
[ | ||
(input) | ||
(output) | ||
] @markup.raw.block | ||
|
||
[ | ||
":skip" | ||
":error" | ||
":fail-fast" | ||
":language" | ||
":platform" | ||
] @attribute | ||
|
||
(attribute | ||
language: (parameter) @string) | ||
|
||
(attribute | ||
platform: (parameter) @constant.builtin) | ||
|
||
(separator) @punctuation.delimiter | ||
|
||
[ "(" ")" ] @punctuation.bracket |
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 |
---|---|---|
@@ -1 +1,29 @@ | ||
; TODO: add injection queries here | ||
(test | ||
(header | ||
(name) | ||
(attributes | ||
. ; skip over non-language attributes | ||
(attribute | ||
!language)* | ||
. ; select only the first language attribute | ||
(attribute | ||
language: (parameter) @injection.language))) | ||
(input) @injection.input) | ||
|
||
((test | ||
(output) @injection.content) | ||
(#set! injection.language "query")) | ||
|
||
; NOTE: dynamic injection | ||
; ((test | ||
; (header | ||
; [ | ||
; (attributes | ||
; (attribute | ||
; !language)) | ||
; ((name) | ||
; . | ||
; (separator)) | ||
; ]) | ||
; (input) @injection.content) | ||
; (#set! injection.language "{}")) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.