1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 06:20:05 +08:00
SpaceVim/bundle/nvim-treesitter/queries/ecma/injections.scm
2022-04-14 12:01:23 +08:00

59 lines
1.4 KiB
Scheme
Vendored

(comment) @jsdoc
(comment) @comment
(call_expression
function: ((identifier) @language)
arguments: ((template_string) @content
(#offset! @content 0 1 0 -1)))
(call_expression
function: ((identifier) @_name
(#eq? @_name "gql"))
arguments: ((template_string) @graphql
(#offset! @graphql 0 1 0 -1)))
(call_expression
function: ((identifier) @_name
(#eq? @_name "hbs"))
arguments: ((template_string) @glimmer
(#offset! @glimmer 0 1 0 -1)))
; styled.div`<css>`
(call_expression
function: (member_expression
object: (identifier) @_name
(#eq? @_name "styled"))
arguments: ((template_string) @css
(#offset! @css 0 1 0 -1)))
; styled(Component)`<css>`
(call_expression
function: (call_expression
function: (identifier) @_name
(#eq? @_name "styled"))
arguments: ((template_string) @css
(#offset! @css 0 1 0 -1)))
; styled.div.attrs({ prop: "foo" })`<css>`
(call_expression
function: (call_expression
function: (member_expression
object: (member_expression
object: (identifier) @_name
(#eq? @_name "styled"))))
arguments: ((template_string) @css
(#offset! @css 0 1 0 -1)))
; styled(Component).attrs({ prop: "foo" })`<css>`
(call_expression
function: (call_expression
function: (member_expression
object: (call_expression
function: (identifier) @_name
(#eq? @_name "styled"))))
arguments: ((template_string) @css
(#offset! @css 0 1 0 -1)))
(regex_pattern) @regex