From 4836bb38d3c13c9f1ebd3533bc35a54f80c7e118 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Tue, 12 Apr 2022 20:57:07 -0500 Subject: add tree-sitter-heex HEEx is a templating engine on top of Elixir's EEx templating language specific to HTML that is included in Phoenix.LiveView (though I think the plan is to eventually include it in base Phoenix). It's a superset of EEx with some additional features like components and slots. The injections don't work perfectly because the Elixir grammar is newline sensitive (the _terminator rule). See https://github.com/elixir-lang/tree-sitter-elixir/issues/24 for more information. --- runtime/queries/elixir/injections.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'runtime/queries/elixir') diff --git a/runtime/queries/elixir/injections.scm b/runtime/queries/elixir/injections.scm index 8370a0d8..c8882534 100644 --- a/runtime/queries/elixir/injections.scm +++ b/runtime/queries/elixir/injections.scm @@ -7,3 +7,10 @@ (#match? @_sigil_name "^(r|R)$") (#set! injection.language "regex") (#set! injection.combined)) + +((sigil + (sigil_name) @_sigil_name + (quoted_content) @injection.content) + (#match? @_sigil_name "^(h|H)$") + (#set! injection.language "heex") + (#set! injection.combined)) -- cgit v1.2.3-70-g09d2