GNU bug report logs -
#75191
[PATCH] Add expression handling to heex-ts-mode
Previous Next
Reported by: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
Date: Mon, 30 Dec 2024 10:55:02 UTC
Severity: wishlist
Tags: patch
Fixed in version 30.1
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75191 in the body.
You can then email your comments to 75191 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75191
; Package
emacs
.
(Mon, 30 Dec 2024 10:55:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 30 Dec 2024 10:55:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
This patch is to handle the recent update to the heex grammar:
https://github.com/phoenixframework/tree-sitter-heex/releases/tag/v0.7.0
This change appears to be backwards compatible.
Kind regards,
Wilhelm
[Message part 2 (text/html, inline)]
[0001-Add-expression-handling-to-heex-ts-mode.patch (text/x-patch, attachment)]
Severity set to 'wishlist' from 'normal'
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 02 Jan 2025 01:23:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75191
; Package
emacs
.
(Thu, 02 Jan 2025 07:45:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 75191 <at> debbugs.gnu.org (full text, mbox):
Wilhelm Kirschbaum <wkirschbaum <at> gmail.com> writes:
> This patch is to handle the recent update to the heex grammar:
> https://github.com/phoenixframework/tree-sitter-heex/releases/tag/v0.7.0
>
> This change appears to be backwards compatible.
Looks safe enough for emacs-30? Eli, Yuan, WDYT?
> From 7e1fd814d19e820a6b17d62ce4229ae1daaef5cf Mon Sep 17 00:00:00 2001
> From: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
> Date: Mon, 30 Dec 2024 12:45:08 +0200
> Subject: [PATCH] Add expression handling to heex-ts-mode
>
> On the latest update of the grammar expressions were added and won't be
> seen as directives anymore.
>
> * lisp/progmodes/heex-ts-mode.el
> (heex-ts--sexp-regexp): Match on expression as well.
> (heex-ts--indent-rules): Indent on expression end.
> * test/lisp/progmodes/heex-ts-mode-resources/indent.erts: Add expression
> indent test.
> ---
> lisp/progmodes/heex-ts-mode.el | 3 ++-
> .../progmodes/heex-ts-mode-resources/indent.erts | 16 ++++++++++++++++
> 2 files changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/progmodes/heex-ts-mode.el b/lisp/progmodes/heex-ts-mode.el
> index b527d96b579..797bfd6c8ff 100644
> --- a/lisp/progmodes/heex-ts-mode.el
> +++ b/lisp/progmodes/heex-ts-mode.el
> @@ -54,7 +54,7 @@ heex-ts-indent-offset
> (defconst heex-ts--sexp-regexp
> (rx bol
> (or "directive" "tag" "component" "slot"
> - "attribute" "attribute_value" "quoted_attribute_value")
> + "attribute" "attribute_value" "quoted_attribute_value" "expression")
> eol))
>
> ;; There seems to be no parent directive block for tree-sitter-heex,
> @@ -81,6 +81,7 @@ heex-ts--indent-rules
> ((node-is "end_slot") parent-bol 0)
> ((node-is "/>") parent-bol 0)
> ((node-is ">") parent-bol 0)
> + ((node-is "}") parent-bol 0)
> ((parent-is "comment") prev-adaptive-prefix 0)
> ((parent-is "component") parent-bol ,offset)
> ((parent-is "tag") parent-bol ,offset)
> diff --git a/test/lisp/progmodes/heex-ts-mode-resources/indent.erts b/test/lisp/progmodes/heex-ts-mode-resources/indent.erts
> index 500ddb2b536..7fef6571933 100644
> --- a/test/lisp/progmodes/heex-ts-mode-resources/indent.erts
> +++ b/test/lisp/progmodes/heex-ts-mode-resources/indent.erts
> @@ -45,3 +45,19 @@ Name: Slots
> </:bar>
> </Foo>
> =-=-=
> +
> +Name: Expression
> +
> +=-=
> +<div>
> +{
> +@bar
> +}
> +</div>
> +=-=
> +<div>
> + {
> + @bar
> + }
> +</div>
> +=-=-=
> --
> 2.45.2
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75191
; Package
emacs
.
(Thu, 02 Jan 2025 08:36:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 75191 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Thu, 2 Jan 2025 01:44:35 -0600
> Cc: Eli Zaretskii <eliz <at> gnu.org>, Yuan Fu <casouri <at> gmail.com>
>
> Wilhelm Kirschbaum <wkirschbaum <at> gmail.com> writes:
>
> > This patch is to handle the recent update to the heex grammar:
> > https://github.com/phoenixframework/tree-sitter-heex/releases/tag/v0.7.0
> >
> > This change appears to be backwards compatible.
>
> Looks safe enough for emacs-30? Eli, Yuan, WDYT?
Looks safe to me, yes.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75191
; Package
emacs
.
(Fri, 03 Jan 2025 05:54:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 75191 <at> debbugs.gnu.org (full text, mbox):
> On Jan 2, 2025, at 12:35 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> From: Stefan Kangas <stefankangas <at> gmail.com>
>> Date: Thu, 2 Jan 2025 01:44:35 -0600
>> Cc: Eli Zaretskii <eliz <at> gnu.org>, Yuan Fu <casouri <at> gmail.com>
>>
>> Wilhelm Kirschbaum <wkirschbaum <at> gmail.com> writes:
>>
>>> This patch is to handle the recent update to the heex grammar:
>>> https://github.com/phoenixframework/tree-sitter-heex/releases/tag/v0.7.0
>>>
>>> This change appears to be backwards compatible.
>>
>> Looks safe enough for emacs-30? Eli, Yuan, WDYT?
>
> Looks safe to me, yes.
Seems fine.
Reply sent
to
Stefan Kangas <stefankangas <at> gmail.com>
:
You have taken responsibility.
(Fri, 03 Jan 2025 08:42:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 03 Jan 2025 08:42:02 GMT)
Full text and
rfc822 format available.
Message #21 received at 75191-done <at> debbugs.gnu.org (full text, mbox):
Version: 30.1
Yuan Fu <casouri <at> gmail.com> writes:
>> On Jan 2, 2025, at 12:35 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>>
>>> From: Stefan Kangas <stefankangas <at> gmail.com>
>>> Date: Thu, 2 Jan 2025 01:44:35 -0600
>>> Cc: Eli Zaretskii <eliz <at> gnu.org>, Yuan Fu <casouri <at> gmail.com>
>>>
>>> Wilhelm Kirschbaum <wkirschbaum <at> gmail.com> writes:
>>>
>>>> This patch is to handle the recent update to the heex grammar:
>>>> https://github.com/phoenixframework/tree-sitter-heex/releases/tag/v0.7.0
>>>>
>>>> This change appears to be backwards compatible.
>>>
>>> Looks safe enough for emacs-30? Eli, Yuan, WDYT?
>>
>> Looks safe to me, yes.
>
> Seems fine.
Thanks all, pushed to emacs-30 as commit ae2589ea7a5. Closing.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 31 Jan 2025 12:24:16 GMT)
Full text and
rfc822 format available.
This bug report was last modified 141 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.