fix(injections): dtd, glimmer.*, razor, tablegen, teal

This commit is contained in:
Christian Clason 2025-04-27 11:04:54 +02:00
parent 4c7509e7b0
commit 3b308861a8
6 changed files with 5 additions and 20 deletions

View file

@ -1 +1,2 @@
(Comment) @comment
((Comment) @injection.content
(#set! injection.language "comment"))

View file

@ -1,13 +1,5 @@
; inherits: ecma
; 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)))
; Ember Unified <template> syntax
; e.g.: <template><SomeComponent @arg={{double @value}} /></template>
((glimmer_template) @injection.content

View file

@ -1,13 +1,5 @@
; inherits: typescript
; 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)))
; Ember Unified <template> syntax
; e.g.: <template><SomeComponent @arg={{double @value}} /></template>
((glimmer_template) @injection.content

View file

@ -3,7 +3,7 @@
([
(html_comment)
(razor_comment)
] @comment
] @injection.content
(#set! injection.language "comment"))
((element) @injection.content

View file

@ -6,4 +6,4 @@
(comment) @injection.content)
(#lua-match? @injection.content "^.*RUN")
(#set! injection.language "bash")
(#offset! @injection.content 0 8))
(#offset! @injection.content 0 8 0 0))

View file

@ -34,7 +34,7 @@
((function_call
(method_index
(parenthesized_expression
(string) @printf)
(string) @injection.content)
key: (identifier) @_func))
(#eq? @_func "format")
(#set! injection.language "printf"))