GNU bug report logs -
#76788
treesit-thing-settings for elixir-ts-mode
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Thu, 6 Mar 2025 18:18:01 UTC
Severity: wishlist
Fixed in version 31.0.50
Done: Juri Linkov <juri <at> linkov.net>
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 76788 in the body.
You can then email your comments to 76788 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
wkirschbaum <at> gmail.com, bug-gnu-emacs <at> gnu.org
:
bug#76788
; Package
emacs
.
(Thu, 06 Mar 2025 18:18:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Juri Linkov <juri <at> linkov.net>
:
New bug report received and forwarded. Copy sent to
wkirschbaum <at> gmail.com, bug-gnu-emacs <at> gnu.org
.
(Thu, 06 Mar 2025 18:18: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)]
Hi Wilhelm,
Currently I'm adding the new 'list' thing to all ts-modes
and noticed that elixir-ts-mode defines the function
'elixir-ts--forward-sexp'.
This function can be superseded by the 'list' definition
in treesit-thing-settings that supports such commands
as 'forward-sexp', 'forward-list', 'up-list', 'down-list',
and modes 'show-paren-mode', 'hs-minor-mode'.
I have tested all cases, and this patch covers all list nodes.
The only doubtful case is the commented out definition
;; (and "\\`call\\'" ,#'elixir-ts--defun-p)
When enabled, it causes too much trouble
with e.g. 'show-paren-mode', etc.
OTOH, this definition is not much needed since
'C-M-a' (beginning-of-defun) and 'C-M-e' (end-of-defun)
already cover this need instead of using 'C-M-f/b',
so 'C-M-a/e' could be used to navigate between functions.
And 'C-M-f/b' navigate in all other cases such as
between 'do' and 'end', parens, etc.
[elixir--ts--thing-settings.patch (text/x-diff, inline)]
diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el
index d50692d87c0..e5a6448fc8f 100644
--- a/lisp/progmodes/elixir-ts-mode.el
+++ b/lisp/progmodes/elixir-ts-mode.el
@@ -111,13 +111,6 @@ elixir-ts-attribute
"Face used for attributes in Elixir files."
:group 'elixir-ts)
-(defconst elixir-ts--sexp-regexp
- (rx bol
- (or "call" "stab_clause" "binary_operator" "list" "tuple" "map" "pair"
- "sigil" "string" "atom" "alias" "arguments" "identifier"
- "boolean" "quoted_content" "bitstring")
- eol))
-
(defconst elixir-ts--test-definition-keywords
'("describe" "test"))
@@ -574,21 +567,10 @@ elixir-ts--treesit-range-rules
(:match "^[HF]$" @_name)
(quoted_content) @heex)))))
-(defvar heex-ts--sexp-regexp)
+(defvar heex-ts--thing-settings)
(defvar heex-ts--indent-rules)
(defvar heex-ts--font-lock-settings)
-(defun elixir-ts--forward-sexp (&optional arg)
- "Move forward across one balanced expression (sexp).
-With ARG, do it many times. Negative ARG means move backward."
- (or arg (setq arg 1))
- (funcall
- (if (> arg 0) #'treesit-end-of-thing #'treesit-beginning-of-thing)
- (if (eq (treesit-language-at (point)) 'heex)
- heex-ts--sexp-regexp
- elixir-ts--sexp-regexp)
- (abs arg)))
-
(defun elixir-ts--treesit-anchor-grand-parent-bol (_n parent &rest _)
"Return the beginning of non-space characters for the parent node of PARENT."
(save-excursion
@@ -636,6 +618,14 @@ elixir-ts--defun-name
(_ nil))))
(_ nil)))
+(defun elixir-ts--with-parens-0-p (node)
+ (equal (treesit-node-type (treesit-node-child node 0))
+ "("))
+
+(defun elixir-ts--with-parens-1-p (node)
+ (equal (treesit-node-type (treesit-node-child node 1))
+ "("))
+
(defvar elixir-ts--syntax-propertize-query
(when (treesit-available-p)
(treesit-query-compile
@@ -722,7 +712,30 @@ elixir-ts-mode
(setq-local treesit-simple-indent-rules elixir-ts--indent-rules)
;; Navigation.
- (setq-local forward-sexp-function #'elixir-ts--forward-sexp)
+ (setq-local treesit-thing-settings
+ `((elixir
+ (list
+ (or ;; (and "\\`call\\'" ,#'elixir-ts--defun-p)
+ (and "\\`arguments\\'" ,#'elixir-ts--with-parens-0-p)
+ (and "\\`unary_operator\\'" ,#'elixir-ts--with-parens-1-p)
+ ,(rx bos (or "block"
+ "quoted_atom"
+ "string"
+ "interpolation"
+ "sigil"
+ "quoted_keyword"
+ "list"
+ "tuple"
+ "bitstring"
+ "map"
+ "do_block"
+ "anonymous_function")
+ eos)))
+ (sentence
+ ,(rx bos (or "call") eos))
+ (text
+ ,(rx bos (or "string" "sigil" "comment") eos)))
+ (heex ,@heex-ts--thing-settings)))
(setq-local treesit-defun-type-regexp
'("call" . elixir-ts--defun-p))
diff --git a/lisp/progmodes/heex-ts-mode.el b/lisp/progmodes/heex-ts-mode.el
index 65aaa0d488d..88f58041c1b 100644
--- a/lisp/progmodes/heex-ts-mode.el
+++ b/lisp/progmodes/heex-ts-mode.el
@@ -56,12 +56,6 @@ heex-ts-indent-offset
:safe 'integerp
:group 'heex-ts)
-(defconst heex-ts--sexp-regexp
- (rx bol
- (or "directive" "tag" "component" "slot"
- "attribute" "attribute_value" "quoted_attribute_value" "expression")
- eol))
-
;; There seems to be no parent directive block for tree-sitter-heex,
;; so we ignore them for now until we learn how to query them.
;; https://github.com/phoenixframework/tree-sitter-heex/issues/28
@@ -139,14 +133,24 @@ heex-ts--defun-name
(treesit-node-child (treesit-node-child node 0) 1) nil)))
(_ nil)))
-(defun heex-ts--forward-sexp (&optional arg)
- "Move forward across one balanced expression (sexp).
-With ARG, do it many times. Negative ARG means move backward."
- (or arg (setq arg 1))
- (funcall
- (if (> arg 0) #'treesit-end-of-thing #'treesit-beginning-of-thing)
- heex-ts--sexp-regexp
- (abs arg)))
+(defvar heex-ts--thing-settings
+ `((list
+ ,(rx bos (or "doctype"
+ "tag"
+ "component"
+ "slot"
+ "expression"
+ "directive"
+ "comment")
+ eos))
+ (sentence
+ ,(rx bos (or "tag_name"
+ "component_name"
+ "attribute")
+ eos))
+ (text
+ ,(rx bos (or "comment" "text") eos)))
+ "`treesit-thing-settings' for HEEx.")
;;;###autoload
(define-derived-mode heex-ts-mode html-mode "HEEx"
@@ -158,10 +162,7 @@ heex-ts-mode
;; Comments
(setq-local treesit-thing-settings
- `((heex
- (text ,(regexp-opt '("comment" "text"))))))
-
- (setq-local forward-sexp-function #'heex-ts--forward-sexp)
+ `((heex ,@heex-ts--thing-settings)))
;; Navigation.
(setq-local treesit-defun-type-regexp
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76788
; Package
emacs
.
(Mon, 10 Mar 2025 06:41:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 76788 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Thanks Juri,
I will have a look at this early this week. The forward-sexp was added very
early, so there is perhaps a better way now.
On Thu, Mar 6, 2025 at 8:18 PM Juri Linkov <juri <at> linkov.net> wrote:
> Hi Wilhelm,
>
> Currently I'm adding the new 'list' thing to all ts-modes
> and noticed that elixir-ts-mode defines the function
> 'elixir-ts--forward-sexp'.
>
> This function can be superseded by the 'list' definition
> in treesit-thing-settings that supports such commands
> as 'forward-sexp', 'forward-list', 'up-list', 'down-list',
> and modes 'show-paren-mode', 'hs-minor-mode'.
>
> I have tested all cases, and this patch covers all list nodes.
> The only doubtful case is the commented out definition
>
> ;; (and "\\`call\\'" ,#'elixir-ts--defun-p)
>
> When enabled, it causes too much trouble
> with e.g. 'show-paren-mode', etc.
> OTOH, this definition is not much needed since
> 'C-M-a' (beginning-of-defun) and 'C-M-e' (end-of-defun)
> already cover this need instead of using 'C-M-f/b',
> so 'C-M-a/e' could be used to navigate between functions.
> And 'C-M-f/b' navigate in all other cases such as
> between 'do' and 'end', parens, etc.
>
[Message part 2 (text/html, inline)]
Severity set to 'wishlist' from 'normal'
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Mon, 10 Mar 2025 21:08:04 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76788
; Package
emacs
.
(Thu, 10 Apr 2025 16:38:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 76788 <at> debbugs.gnu.org (full text, mbox):
close 76788 31.0.50
thanks
On Mon, Mar 10 2025, Wilhelm Kirschbaum wrote:
> I will have a look at this early this week. The forward-sexp was added very
> early, so there is perhaps a better way now.
Indeed, there is a better way now, so I adapted it.
BTW, I was a surprise that only elixir can embed heex,
but not vice versa. So I tried to embed elixir in heex
using injections.scm queries from tree-sitter-heex repo:
#+begin_src emacs-lisp
(define-derived-mode heex-ts-mode html-mode "HEEx"
...
(setq-local treesit-range-settings
(treesit-range-rules
:embed 'elixir
:host 'heex
'((directive [(partial_expression_value)
(ending_expression_value)]
@cap))
:embed 'elixir
:host 'heex
:local t
'((directive (expression_value) @cap)
(expression (expression_value) @cap))))
#+end_src
together with combined treesit-font-lock-settings/feature-list.
And these ranges work nicely only separately, but not when combined.
So need to investigate more. Maybe will create a new report.
bug marked as fixed in version 31.0.50, send any further explanations to
76788 <at> debbugs.gnu.org and Juri Linkov <juri <at> linkov.net>
Request was from
Juri Linkov <juri <at> linkov.net>
to
control <at> debbugs.gnu.org
.
(Thu, 10 Apr 2025 16:38:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76788
; Package
emacs
.
(Tue, 15 Apr 2025 07:02:02 GMT)
Full text and
rfc822 format available.
Message #18 received at 76788 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, Apr 14, 2025 at 7:08 PM Juri Linkov <juri <at> linkov.net> wrote:
> > I just tested the latest changes and the forward-sexp is not working
> > correctly. I will look at the changes when I have a minute.
>
> Previously C-M-f jumped from "def" to "end":
>
Yes, this is desired. The expression starts with "def" and the do -> end is
just an argument to the "def" macro.
>
> def fun(a) do
> end
>
> The change is to jump only from "do" to "end" like in other ts-modes.
>
Why is this better? The one huge advantage that elixir-ts-mode brought to
the table was to navigate between functions, the existing elixir-mode could
not get this right.
Before the changes it is possible to navigate or kill the next x functions,
now it is unpredictable. The Elixir grammar is a bit more complicated than
most other languages unfortunately.
>
> To keep jumping from "def" to "end" a possible change is to add
>
> (or (and "\\`call\\'" ,#'elixir-ts--defun-p)
>
> to the 'list' thing in 'treesit-thing-settings'.
>
It's not just for the "def" to "end" this change breaks forward-sexp for
function calls, case blocks etc...
>
> But there is a new command 'treesit-cycle-sexp-type'
> that switches from jumping "do"->"end" to "def"->"end".
>
I don't see any scenario where this will be useful to navigate Elixir code.
Apologies, I see I replied to you directly and not to the thread. Added
the thread again.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76788
; Package
emacs
.
(Tue, 15 Apr 2025 17:38:04 GMT)
Full text and
rfc822 format available.
Message #21 received at 76788 <at> debbugs.gnu.org (full text, mbox):
> Previously C-M-f jumped from "def" to "end":
>
> Yes, this is desired. The expression starts with "def" and the do -> end is
> just an argument to the "def" macro.
>
> def fun(a) do
> end
>
> The change is to jump only from "do" to "end" like in other ts-modes.
>
> Why is this better?
Because otherwise there is no easy way to navigate to the function name
and its arguments. There were many complaints that unlike smie-based sexp
now tree-sitter jumps too far directly to the end of functions.
So sadly an idealistic promise of tree-sitter doesn't fit perfectly
into the real world.
For many years I used elixir-mode before switching to elixir-ts-mode.
And it caused a minor disruption by the inability to move to the
function name and arguments as before in elixir-mode.
> The one huge advantage that elixir-ts-mode brought to
> the table was to navigate between functions, the existing elixir-mode could
> not get this right.
The new command 'treesit-cycle-sexp-type' keeps this advantage
while allowing the users to toggle the traditional behavior
where C-M-f moves over the arguments.
> Before the changes it is possible to navigate or kill the next x functions,
> now it is unpredictable. The Elixir grammar is a bit more complicated than
> most other languages unfortunately.
This is still possible with 'treesit-cycle-sexp-type'.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76788
; Package
emacs
.
(Wed, 16 Apr 2025 06:47:08 GMT)
Full text and
rfc822 format available.
Message #24 received at 76788 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Tue, Apr 15, 2025 at 7:37 PM Juri Linkov <juri <at> linkov.net> wrote:
> > Previously C-M-f jumped from "def" to "end":
> >
> > Yes, this is desired. The expression starts with "def" and the do -> end
> is
> > just an argument to the "def" macro.
> >
> > def fun(a) do
> > end
> >
> > The change is to jump only from "do" to "end" like in other ts-modes.
> >
> > Why is this better?
>
> Because otherwise there is no easy way to navigate to the function name
> and its arguments. There were many complaints that unlike smie-based sexp
> now tree-sitter jumps too far directly to the end of functions.
> So sadly an idealistic promise of tree-sitter doesn't fit perfectly
> into the real world.
>
In Elixir
def foo(bar), do: bar
is pretty much the same as
(defun foo (bar) bar)
So I think the original implementation is more natural to Emacs users, and
yes there is one slight downside, but at the cost of a multitude of
improvements for navigation. The majority of users I got feedback from
prefer how the new forward-sexp works. The smie-based sexp hardly worked in
any expected way as well. Look at how ruby-mode works with navigation ( I
have not tried ruby-ts-mode ), as it also properly treats def end blocks as
sexps.
>
> For many years I used elixir-mode before switching to elixir-ts-mode.
> And it caused a minor disruption by the inability to move to the
> function name and arguments as before in elixir-mode.
>
I understand that, but this is one case where it is slightly inconvenient,
for any other block in elixir it is impossible to navigate around now.
>
> > The one huge advantage that elixir-ts-mode brought to
> > the table was to navigate between functions, the existing elixir-mode
> could
> > not get this right.
>
> The new command 'treesit-cycle-sexp-type' keeps this advantage
> while allowing the users to toggle the traditional behavior
> where C-M-f moves over the arguments.
>
How do I enable this? Is this a new setting? Will it make the navigation
work as before?
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76788
; Package
emacs
.
(Wed, 16 Apr 2025 17:37:03 GMT)
Full text and
rfc822 format available.
Message #27 received at 76788 <at> debbugs.gnu.org (full text, mbox):
>>>> Previously C-M-f jumped from "def" to "end":
>>>
>>> Yes, this is desired. The expression starts with "def" and the do -> end is
>>> just an argument to the "def" macro.
>>>
>>> def fun(a) do
>>> end
>>>
>>> The change is to jump only from "do" to "end" like in other ts-modes.
>>>
>>> Why is this better?
>>
>> Because otherwise there is no easy way to navigate to the function name
>> and its arguments. There were many complaints that unlike smie-based sexp
>> now tree-sitter jumps too far directly to the end of functions.
>> So sadly an idealistic promise of tree-sitter doesn't fit perfectly
>> into the real world.
>
> In Elixir
>
> def foo(bar), do: bar
>
> is pretty much the same as
>
> (defun foo (bar) bar)
>
> So I think the original implementation is more natural to Emacs users, and
> yes there is one slight downside, but at the cost of a multitude of
> improvements for navigation. The majority of users I got feedback from
> prefer how the new forward-sexp works. The smie-based sexp hardly worked in
> any expected way as well.
Emacs users also use many other ts-modes and complained that
forward-sexp relies too much on tree-sitter to jump too far.
For example, in c-ts-mode forward-sexp jumped to the function end
like 'end-of-defun' does:
void foo (void *bar) {
bar()
}
> Look at how ruby-mode works with navigation ( I have not tried
> ruby-ts-mode ), as it also properly treats def end blocks as sexps.
Ruby is different since its function body is not enclosed
within delimiters such as "do...end" in Elixir.
>>> The one huge advantage that elixir-ts-mode brought to
>>> the table was to navigate between functions, the existing elixir-mode could
>>> not get this right.
>>
>> The new command 'treesit-cycle-sexp-type' keeps this advantage
>> while allowing the users to toggle the traditional behavior
>> where C-M-f moves over the arguments.
>
> How do I enable this? Is this a new setting?
Ok, since you prefer treesit-based navigation by default, now I enabled
'treesit-cycle-sexp-type' by default in 'elixir-ts-mode'.
> Will it make the navigation work as before?
Yes, now by default the navigation works as before.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76788
; Package
emacs
.
(Thu, 17 Apr 2025 06:04:02 GMT)
Full text and
rfc822 format available.
Message #30 received at 76788 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
>
>
> Look at how ruby-mode works with navigation ( I have not tried
> > ruby-ts-mode ), as it also properly treats def end blocks as sexps.
>
> Ruby is different since its function body is not enclosed
> within delimiters such as "do...end" in Elixir.
>
Sure, but that is just syntax. the do, end blocks are still just parameters
to the def macro.
>
> >>> The one huge advantage that elixir-ts-mode brought to
> >>> the table was to navigate between functions, the existing elixir-mode
> could
> >>> not get this right.
> >>
> >> The new command 'treesit-cycle-sexp-type' keeps this advantage
> >> while allowing the users to toggle the traditional behavior
> >> where C-M-f moves over the arguments.
> >
> > How do I enable this? Is this a new setting?
>
> Ok, since you prefer treesit-based navigation by default, now I enabled
> 'treesit-cycle-sexp-type' by default in 'elixir-ts-mode'.
I already added the hooks to cycle this on my side, but since it is a
change, perhaps having the default to function as it is before is not a bad
idea.
>
> > Will it make the navigation work as before?
>
> Yes, now by default the navigation works as before.
>
I tried it out and it seems to work well. Thanks for the change, anything
to make it simpler is great.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76788
; Package
emacs
.
(Thu, 17 Apr 2025 10:16:01 GMT)
Full text and
rfc822 format available.
Message #33 received at 76788 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
There is an error trying to indent code using tab with the latest changes:
treesit--indent-largest-node-at: Wrong type argument: listp,
#<treesit-parser for elixir>
car(#<treesit-parser for elixir>)
treesit--indent-largest-node-at(3629)
treesit--indent-1()
treesit-indent()
indent--funcall-widened(treesit-indent)
indent-for-tab-command(nil)
funcall-interactively(indent-for-tab-command nil)
call-interactively(indent-for-tab-command nil nil)
command-execute(indent-for-tab-command)
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76788
; Package
emacs
.
(Thu, 17 Apr 2025 17:23:02 GMT)
Full text and
rfc822 format available.
Message #36 received at 76788 <at> debbugs.gnu.org (full text, mbox):
> There is an error trying to indent code using tab with the latest changes:
>
> treesit--indent-largest-node-at: Wrong type argument: listp,
> #<treesit-parser for elixir>
>
> car(#<treesit-parser for elixir>)
> treesit--indent-largest-node-at(3629)
> treesit--indent-1()
> treesit-indent()
> indent--funcall-widened(treesit-indent)
> indent-for-tab-command(nil)
> funcall-interactively(indent-for-tab-command nil)
> call-interactively(indent-for-tab-command nil nil)
> command-execute(indent-for-tab-command)
Thanks, now fixed.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76788
; Package
emacs
.
(Fri, 18 Apr 2025 16:56:07 GMT)
Full text and
rfc822 format available.
Message #39 received at 76788 <at> debbugs.gnu.org (full text, mbox):
>> BTW, I was a surprise that only elixir can embed heex,
>> but not vice versa. So I tried to embed elixir in heex
>> using injections.scm queries from tree-sitter-heex repo:
>
>> #+begin_src emacs-lisp
>> (define-derived-mode heex-ts-mode html-mode "HEEx"
>> ...
>> (setq-local treesit-range-settings
>> (treesit-range-rules
>> :embed 'elixir
>> :host 'heex
>> '((directive [(partial_expression_value)
>> (ending_expression_value)]
>> @cap))
>> :embed 'elixir
>> :host 'heex
>> :local t
>> '((directive (expression_value) @cap)
>> (expression (expression_value) @cap))))
>> #+end_src
>>
>> together with combined treesit-font-lock-settings/feature-list.
>> And these ranges work nicely only separately, but not when combined.
>> So need to investigate more. Maybe will create a new report.
>
> Thanks for this. I kind of forgot about it, sorry about that. It would be
> great if that is possible, but I don't know how that would work though?
Ok, now I added elixir embedding in heex, as well as
elixir->heex->elixir that e.g. highlights '@entries' in:
def unordered_list(assigns) do
~H"""
<ul>
<li :for={entry <- @entries}>{render_slot(@inner_block, entry)}</li>
</ul>
"""
end
that works well.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76788
; Package
emacs
.
(Sun, 20 Apr 2025 17:43:02 GMT)
Full text and
rfc822 format available.
Message #42 received at 76788 <at> debbugs.gnu.org (full text, mbox):
>>> together with combined treesit-font-lock-settings/feature-list.
>>> And these ranges work nicely only separately, but not when combined.
>>> So need to investigate more. Maybe will create a new report.
>>
>> Thanks for this. I kind of forgot about it, sorry about that. It would be
>> great if that is possible, but I don't know how that would work though?
>
> Ok, now I added elixir embedding in heex, as well as
> elixir->heex->elixir
Thanks for elixir/heex indentation tests that revealed one problem,
I fixed it by adapting one query from heex-ts--indent-rules
to elixir-ts--indent-rules:
((parent-is "^source$")
,(lambda (_node _parent bol &rest _)
;; If Elixir is embedded indent to parent
;; otherwise indent to the bol.
(if (treesit-local-parsers-at (point))
(save-excursion
(goto-char (treesit-node-start
(treesit-node-at bol 'heex)))
(back-to-indentation)
(point))
(pos-bol)))
,(lambda (_node _parent _bol &rest _)
(if (treesit-local-parsers-at (point))
elixir-ts-indent-offset
0)))
So now all indentation tests are passed.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76788
; Package
emacs
.
(Tue, 22 Apr 2025 06:41:01 GMT)
Full text and
rfc822 format available.
Message #45 received at 76788 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
>
> Ok, now I added elixir embedding in heex, as well as
> elixir->heex->elixir that e.g. highlights '@entries' in:
>
> def unordered_list(assigns) do
> ~H"""
> <ul>
> <li :for={entry <- @entries}>{render_slot(@inner_block, entry)}</li>
> </ul>
> """
> end
>
> that works well.
>
Fantastic, this seems to work well on my side as well.
[Message part 2 (text/html, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 20 May 2025 11:24:23 GMT)
Full text and
rfc822 format available.
This bug report was last modified 42 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.