Files
nvim-config/queries/typescript/injections.scm
T
guy176251 5860b649f5 - updated plugins
- updated html injections for angular components
2025-04-05 19:22:41 -05:00

42 lines
1.2 KiB
Scheme

; angular inline templates
((decorator
(call_expression
(identifier) @_decorator
(arguments
(object
(pair
(property_identifier) @_key
(template_string) @injection.content
(#set! injection.include-children)
(#set! injection.language "angular"))))))
(#eq? @_decorator "Component") (#eq? @_key "template"))
; angular inline styles
((decorator
(call_expression
(identifier) @_decorator
(arguments
(object
(pair
(property_identifier) @_key
(array
(string
(string_fragment) @injection.content
(#set! injection.include-children)
(#set! injection.language "css"))))))))
(#eq? @_decorator "Component") (#eq? @_key "styles"))
; angular inline styles "template string"
((decorator
(call_expression
(identifier) @_decorator
(arguments
(object
(pair
(property_identifier) @_key
(array
(template_string) @injection.content
(#set! injection.include-children)
(#set! injection.language "css")))))))
(#eq? @_decorator "Component") (#eq? @_key "styles"))