forked from Mirrors/helix
add tree-sitter-embedded-template (erb & ejs) (#2055)
After the incremental parsing rewrite for injections (which was released in 22.03 https://helix-editor.com/news/release-22-03-highlights/#incremental-injection-parsing-rewrite), we can now do combined injections which lets us pull in some templating grammars. The most notable of those is embedded-template - a pretty straightforward grammar that covers ERB and EJS. The grammar and highlights queries are shared between the two but they have different injections.imgbot
parent
78b1600943
commit
494306ad7a
@ -0,0 +1,12 @@
|
|||||||
|
(comment_directive) @comment
|
||||||
|
|
||||||
|
[
|
||||||
|
"<%#"
|
||||||
|
"<%"
|
||||||
|
"<%="
|
||||||
|
"<%_"
|
||||||
|
"<%-"
|
||||||
|
"%>"
|
||||||
|
"-%>"
|
||||||
|
"_%>"
|
||||||
|
] @keyword
|
@ -0,0 +1,7 @@
|
|||||||
|
((content) @injection.content
|
||||||
|
(#set! injection.language "html")
|
||||||
|
(#set! injection.combined))
|
||||||
|
|
||||||
|
((code) @injection.content
|
||||||
|
(#set! injection.language "javascript")
|
||||||
|
(#set! injection.combined))
|
@ -0,0 +1 @@
|
|||||||
|
; inherits: ejs
|
@ -0,0 +1,7 @@
|
|||||||
|
((content) @injection.content
|
||||||
|
(#set! injection.language "html")
|
||||||
|
(#set! injection.combined))
|
||||||
|
|
||||||
|
((code) @injection.content
|
||||||
|
(#set! injection.language "ruby")
|
||||||
|
(#set! injection.combined))
|
Loading…
Reference in New Issue