mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
feat: add gql function highlighting for ecmascript injection (#8541)
This commit is contained in:
parent
6bc51d020a
commit
995b75fd51
1 changed files with 6 additions and 1 deletions
|
|
@ -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"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue