From: Wilhelm <wkirschbaum@gmail.com>
To: emacs-devel@gnu.org
Subject: Tree-sitter, using treesit-range-rules for embedded languages
Date: Tue, 22 Nov 2022 19:24:13 +0200 [thread overview]
Message-ID: <87o7syaon6.fsf@gmail.com> (raw)
Is there perhaps an example using treesit-range-rules? To following
attempt to set treesit-range-settings does not seem to have the desired
effect.
(defvar heex--treesit-range-rules
(treesit-range-rules
:embed 'elixir
:host 'heex
'((directive (partial_expression_value) @cap)
(directive (expression_value) @cap)
(expression (expression_value) @cap))))
(setq-local treesit-range-settings heex--treesit-range-rules)
The following error also pops up when modifying the buffer when removing
buffer content:
Error during redisplay: (jit-lock-function 1) signaled
(treesit-range-invalid "RANGE is either overlapping, out-of-order or
out-of-range" ((11 . 20)))
The full attempt is here: https://github.com/wkirschbaum/elixir-mode/blob/main/heex-mode.el
next reply other threads:[~2022-11-22 17:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 17:24 Wilhelm [this message]
2022-11-22 19:28 ` Tree-sitter, using treesit-range-rules for embedded languages Yuan Fu
2022-11-22 19:52 ` Wilhelm Hugo Kirschbaum
2022-11-22 20:39 ` Yuan Fu
2022-11-23 7:12 ` Wilhelm Kirschbaum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o7syaon6.fsf@gmail.com \
--to=wkirschbaum@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).