feat: add gql function highlighting for ecmascript injection (#8541)

This commit is contained in:
Ethan Rutt 2026-03-01 15:29:06 -06:00 committed by GitHub
parent 6bc51d020a
commit 995b75fd51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -59,10 +59,15 @@
(#set! injection.include-children) (#set! injection.include-children)
(#set! injection.language "groq")) (#set! injection.language "groq"))
; gql`...` or gql(`...`)
(call_expression (call_expression
function: (identifier) @_name function: (identifier) @_name
(#eq? @_name "gql") (#eq? @_name "gql")
arguments: (template_string) @injection.content arguments: [
(arguments
(template_string) @injection.content)
(template_string) @injection.content
]
(#offset! @injection.content 0 1 0 -1) (#offset! @injection.content 0 1 0 -1)
(#set! injection.include-children) (#set! injection.include-children)
(#set! injection.language "graphql")) (#set! injection.language "graphql"))