mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 09:20:04 -04:00
feat(glimmer): add glimmer-javascript and glimmer-typescript (#7064)
This commit is contained in:
parent
0b61eb4923
commit
628f53e4cb
12 changed files with 152 additions and 8 deletions
15
queries/glimmer_javascript/injections.scm
Normal file
15
queries/glimmer_javascript/injections.scm
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
; 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
|
||||
(#set! injection.language "glimmer")
|
||||
(#set! injection.include-children))
|
||||
Loading…
Add table
Add a link
Reference in a new issue