From: Yuan Fu <casouri@gmail.com>
To: Abin Simon <mail@meain.io>
Cc: emacs-devel@gnu.org
Subject: Re: Question on getting tree-sitter matches
Date: Sun, 19 Mar 2023 14:59:58 -0700 [thread overview]
Message-ID: <4C74116B-D2D3-4C48-A966-A7F4DBB9C330@gmail.com> (raw)
In-Reply-To: <874jqmej5y.fsf@meain.io>
> On Mar 14, 2023, at 9:24 PM, Abin Simon <mail@meain.io> wrote:
>
>> I see. We can add an optional argument to treesit-query-capture to toggle the “grouping” of matches, WDYT?
>
> That would work for my current usecase.
>
> With that said, I would like to point out that elisp-tree-sitter has two
> methods with one named captures returning a list of captures and one
> named matches which returns the "grouped" captures(along with pattern
> index). I'm not sure if these names have any semantic meaning. From a
> quick scan of Neovim docs, they too seem to have two functions with
> similar names.
For your particular use, would it be better to add a separate function or a flag to treesit-query-capture?
Yuan
next prev parent reply other threads:[~2023-03-19 21:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-12 14:32 Question on getting tree-sitter matches Abin Simon
2023-03-13 2:34 ` Yuan Fu
2023-03-13 3:29 ` Abin Simon
2023-03-14 23:31 ` Yuan Fu
2023-03-15 4:24 ` Abin Simon
2023-03-19 21:59 ` Yuan Fu [this message]
2023-03-20 4:09 ` Abin Simon
2023-03-20 20:27 ` Ergus
2023-03-20 23:25 ` Yuan Fu
2023-03-21 3:29 ` Eli Zaretskii
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=4C74116B-D2D3-4C48-A966-A7F4DBB9C330@gmail.com \
--to=casouri@gmail.com \
--cc=emacs-devel@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.
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).