From cbc72e84d7a4c2a1ed5ec81bced3d280c69b4649 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Tue, 22 Nov 2022 21:28:17 -0600 Subject: [PATCH] Update tree-sitter-heex tree-sitter-heex split out the ending_expression_value from the partial_expression value which can help with indentation. --- languages.toml | 2 +- runtime/queries/heex/injections.scm | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/languages.toml b/languages.toml index 9007cc657..f6a238f43 100644 --- a/languages.toml +++ b/languages.toml @@ -1360,7 +1360,7 @@ config = { elixirLS.dialyzerEnabled = false } [[grammar]] name = "heex" -source = { git = "https://github.com/phoenixframework/tree-sitter-heex", rev = "881f1c805f51485a26ecd7865d15c9ef8d606a78" } +source = { git = "https://github.com/phoenixframework/tree-sitter-heex", rev = "2e1348c3cf2c9323e87c2744796cf3f3868aa82a" } [[language]] name = "sql" diff --git a/runtime/queries/heex/injections.scm b/runtime/queries/heex/injections.scm index d97e4b3ef..159b6f0e1 100644 --- a/runtime/queries/heex/injections.scm +++ b/runtime/queries/heex/injections.scm @@ -6,7 +6,11 @@ ; <%= if true do %> ;

hello, tree-sitter!

; <% end %> -((directive (partial_expression_value) @injection.content) +((directive + [ + (partial_expression_value) + (ending_expression_value) + ] @injection.content) (#set! injection.language "elixir") (#set! injection.include-children) (#set! injection.combined))