diff options
| -rw-r--r-- | runtime/queries/tsx/injections.scm | 2 | ||||
| -rw-r--r-- | runtime/queries/typescript/injections.scm | 27 |
2 files changed, 28 insertions, 1 deletions
diff --git a/runtime/queries/tsx/injections.scm b/runtime/queries/tsx/injections.scm index b6d9b28bf..07391231c 100644 --- a/runtime/queries/tsx/injections.scm +++ b/runtime/queries/tsx/injections.scm @@ -1 +1 @@ -; inherits: ecma,jsx +; inherits: typescript,jsx diff --git a/runtime/queries/typescript/injections.scm b/runtime/queries/typescript/injections.scm index 04328f099..42c50efff 100644 --- a/runtime/queries/typescript/injections.scm +++ b/runtime/queries/typescript/injections.scm @@ -1 +1,28 @@ ; inherits: ecma + +; styled.div<{}>`<css>` +(call_expression + function: (non_null_expression + (instantiation_expression + (member_expression + object: (identifier) @_name + (#eq? @_name "styled") + property: (property_identifier)) + type_arguments: (type_arguments))) + arguments: ((template_string) @injection.content + (#offset! @injection.content 0 1 0 -1) + (#set! injection.include-children) + (#set! injection.language "styled"))) + +; styled.div<T>`<css>` +(binary_expression + left: (binary_expression + left: (member_expression + object: (identifier) @_name + (#eq? @_name "styled") + property: (property_identifier)) + right: (identifier)) + right: (template_string) @injection.content + (#offset! @injection.content 0 1 0 -1) + (#set! injection.include-children) + (#set! injection.language "styled")) |
