mirror of
https://github.com/helix-editor/helix
synced 2026-03-11 22:38:26 +01:00
This was using the old Neovim syntax for injections which used captures of the injection language on the injection content node. These days both Helix and Neovim use injection.content and injection.language captures / settings.
22 lines
705 B
Scheme
22 lines
705 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 "glimmer")
|
|
(#set! injection.include-children))
|
|
|
|
; 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) @injection.content)
|
|
(#set! injection.language "glimmer"))
|