From 480e549da9cff26303e1f261c30a3e1c49903eb0 Mon Sep 17 00:00:00 2001 From: Brian Cardarella Date: Wed, 23 Oct 2024 12:02:12 -0400 Subject: [PATCH 1/2] Add support for LiveView Native template syntax highlighting --- CHANGELOG.md | 6 ++++++ queries/injections.scm | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 165bbfa..05f218e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [unreleased] + +## Added + +* Alias ~H to ~LVN for LiveView Native template highlighting support + ## [v0.3.1](https://github.com/elixir-lang/tree-sitter-elixir/tree/v0.3.1) (2024-09-28) ### Changed diff --git a/queries/injections.scm b/queries/injections.scm index 16069ce..d0668fe 100644 --- a/queries/injections.scm +++ b/queries/injections.scm @@ -2,6 +2,6 @@ ((sigil (sigil_name) @_sigil_name (quoted_content) @injection.content) - (#eq? @_sigil_name "H") + (#match? @_sigil_name "^(H|LVN)$") (#set! injection.language "heex") (#set! injection.combined)) From ac3a3baea9812bc5edf2055ecd8d5ec6c4ca4171 Mon Sep 17 00:00:00 2001 From: Brian Cardarella Date: Wed, 23 Oct 2024 12:15:43 -0400 Subject: [PATCH 2/2] Update CHANGELOG.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jonatan KÅ‚osko --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05f218e..beeee55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## [unreleased] +## [Unreleased](https://github.com/elixir-lang/tree-sitter-elixir/tree/main) -## Added +### Added -* Alias ~H to ~LVN for LiveView Native template highlighting support +* Support for ~LVN sigils (LiveView Native templates) in the built-in injections ([#75](https://github.com/elixir-lang/tree-sitter-elixir/pull/75)) ## [v0.3.1](https://github.com/elixir-lang/tree-sitter-elixir/tree/v0.3.1) (2024-09-28)