unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Abin Simon <mail@meain.io>
To: Yuan Fu <casouri@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Question on getting tree-sitter matches
Date: Wed, 15 Mar 2023 09:54:25 +0530	[thread overview]
Message-ID: <874jqmej5y.fsf@meain.io> (raw)
In-Reply-To: <A17D1A81-840B-4A6A-B509-3991F15D6AC7@gmail.com>

> 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.



  reply	other threads:[~2023-03-15  4:24 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 [this message]
2023-03-19 21:59         ` Yuan Fu
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=874jqmej5y.fsf@meain.io \
    --to=mail@meain.io \
    --cc=casouri@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).