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.
Full log
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.
This bug report was last modified 86 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.