feat(jinja): add parser and queries (#7573)

Signed-off-by: loongtao.zhang <loongtao.zhang@outlook.com>
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
This commit is contained in:
loongtao.zhang 2025-02-08 17:38:50 +08:00 committed by GitHub
parent e8ccc339a3
commit cbd48fac13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 204 additions and 0 deletions

View file

@ -0,0 +1,19 @@
; inherits: jinja_inline
[
"{{"
"{{-"
"{{+"
"+}}"
"-}}"
"}}"
"{%"
"{%-"
"{%+"
"+%}"
"-%}"
"%}"
] @keyword.directive
; TODO: only match raw
(raw_start) @keyword

View file

@ -0,0 +1,5 @@
((inline) @injection.content
(#set! injection.language "jinja_inline"))
((comment) @injection.content
(#set! injection.language "comment"))