mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 17:30:08 -04:00
fix(injections): dtd, glimmer.*, razor, tablegen, teal
This commit is contained in:
parent
4c7509e7b0
commit
3b308861a8
6 changed files with 5 additions and 20 deletions
|
|
@ -1 +1,2 @@
|
||||||
(Comment) @comment
|
((Comment) @injection.content
|
||||||
|
(#set! injection.language "comment"))
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,5 @@
|
||||||
; inherits: ecma
|
; 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
|
; Ember Unified <template> syntax
|
||||||
; e.g.: <template><SomeComponent @arg={{double @value}} /></template>
|
; e.g.: <template><SomeComponent @arg={{double @value}} /></template>
|
||||||
((glimmer_template) @injection.content
|
((glimmer_template) @injection.content
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,5 @@
|
||||||
; inherits: typescript
|
; 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
|
; Ember Unified <template> syntax
|
||||||
; e.g.: <template><SomeComponent @arg={{double @value}} /></template>
|
; e.g.: <template><SomeComponent @arg={{double @value}} /></template>
|
||||||
((glimmer_template) @injection.content
|
((glimmer_template) @injection.content
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
([
|
([
|
||||||
(html_comment)
|
(html_comment)
|
||||||
(razor_comment)
|
(razor_comment)
|
||||||
] @comment
|
] @injection.content
|
||||||
(#set! injection.language "comment"))
|
(#set! injection.language "comment"))
|
||||||
|
|
||||||
((element) @injection.content
|
((element) @injection.content
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,4 @@
|
||||||
(comment) @injection.content)
|
(comment) @injection.content)
|
||||||
(#lua-match? @injection.content "^.*RUN")
|
(#lua-match? @injection.content "^.*RUN")
|
||||||
(#set! injection.language "bash")
|
(#set! injection.language "bash")
|
||||||
(#offset! @injection.content 0 8))
|
(#offset! @injection.content 0 8 0 0))
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
((function_call
|
((function_call
|
||||||
(method_index
|
(method_index
|
||||||
(parenthesized_expression
|
(parenthesized_expression
|
||||||
(string) @printf)
|
(string) @injection.content)
|
||||||
key: (identifier) @_func))
|
key: (identifier) @_func))
|
||||||
(#eq? @_func "format")
|
(#eq? @_func "format")
|
||||||
(#set! injection.language "printf"))
|
(#set! injection.language "printf"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue