feat(groq): add parser and queries (#8008)

This commit is contained in:
Alan Russell 2025-07-18 17:04:42 +01:00 committed by GitHub
parent a5edb0a274
commit 61ec748ef7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 142 additions and 0 deletions

View file

@ -48,6 +48,17 @@
(#offset! @injection.content 0 1 0 -1)
(#set! injection.include-children))
; Sanity CMS GROQ query
; defineQuery(`...`)
(call_expression
function: (identifier) @_name
(#eq? @_name "defineQuery")
arguments: (arguments
(template_string) @injection.content)
(#offset! @injection.content 0 1 0 -1)
(#set! injection.include-children)
(#set! injection.language "groq"))
(call_expression
function: (identifier) @_name
(#eq? @_name "gql")