mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 20:30:05 -04:00
Add JavaScript defineQuery injection
This commit is contained in:
parent
91874c485e
commit
af278ca8c1
1 changed files with 11 additions and 0 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue