mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-27 20:03:29 +04:00
21 lines
657 B
Scheme
21 lines
657 B
Scheme
; PARSE GLIMMER TEMPLATES
|
|
(call_expression
|
|
function: [
|
|
(identifier) @injection.language
|
|
(member_expression
|
|
property: (property_identifier) @injection.language)
|
|
]
|
|
arguments: (template_string) @injection.content)
|
|
|
|
; e.g.: <template><SomeComponent @arg={{double @value}} /></template>
|
|
((glimmer_template) @injection.content
|
|
(#set! injection.language "hbs"))
|
|
|
|
; Parse Ember/Glimmer/Handlebars/HTMLBars/etc. template literals
|
|
; e.g.: await render(hbs`<SomeComponent />`)
|
|
(call_expression
|
|
function: ((identifier) @_name
|
|
(#eq? @_name "hbs"))
|
|
arguments: ((template_string) @glimmer
|
|
(#offset! @glimmer 0 1 0 -1)))
|