mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-07 05:50:04 -04:00
Support both styled.div and styled(Component)
This new injection caters for code like this: ``` const IntroWindow = styled(Window)` grid-area: intro; ` ```
This commit is contained in:
parent
058e050315
commit
6240dae0e4
1 changed files with 11 additions and 2 deletions
|
|
@ -20,7 +20,16 @@
|
|||
|
||||
(call_expression
|
||||
function: (member_expression
|
||||
object: (identifier) @_name (#eq? @_name "styled"))
|
||||
arguments: ((template_string) @css (#offset! @css 0 1 0 -1)))
|
||||
object: (identifier) @_name
|
||||
(#eq? @_name "styled"))
|
||||
arguments: ((template_string) @css
|
||||
(#offset! @css 0 1 0 -1)))
|
||||
|
||||
(call_expression
|
||||
function: (call_expression
|
||||
function: (identifier) @_name
|
||||
(#eq? @_name "styled"))
|
||||
arguments: ((template_string) @css
|
||||
(#offset! @css 0 1 0 -1)))
|
||||
|
||||
(regex_pattern) @regex
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue