From: "Daniel Martín" <mardani29@yahoo.es>
To: Abin Simon <mail@meain.io>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Hooks on treesit parse refresh
Date: Tue, 28 Feb 2023 13:37:08 +0100 [thread overview]
Message-ID: <m1v8jmx8y3.fsf@yahoo.es> (raw)
In-Reply-To: <87y1on63wm.fsf@meain.io> (Abin Simon's message of "Fri, 24 Feb 2023 10:44:33 +0530")
Abin Simon <mail@meain.io> writes:
> I was adding support for builtin treesit to one of my packages,
> scopeline. https://github.com/meain/scopeline.el
>
> The package makes use of these hooks in elisp-tree-sitter to run when a
> tree-sitter tree refresh has happened:
> - tree-sitter-after-first-parse-hook
> - tree-sitter-after-change-functions
>
> I was going through treesit code, but could not find anything
> similar. `treesit-explore' seem to add a hook to `post-command-hook' but
> wanted to check if there was something more specific that I could use
> instead.
The closest API in Emacs 29 is the concept of Tree-sitter notifiers.
Read the documentation of function treesit-parser-add-notifier and
friends.
If this API is not sufficient for what you are trying to implement, I
suggest you open a feature suggestion by sending an email to
bug-gnu-emacs@gnu.org
Thanks.
prev parent reply other threads:[~2023-02-28 12:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-24 5:14 Hooks on treesit parse refresh Abin Simon
2023-02-28 12:37 ` Daniel Martín [this message]
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=m1v8jmx8y3.fsf@yahoo.es \
--to=mardani29@yahoo.es \
--cc=help-gnu-emacs@gnu.org \
--cc=mail@meain.io \
/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.
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).