From: Dmitry Gutov <dgutov@yandex.ru>
To: Yuan Fu <casouri@gmail.com>, emacs-devel <emacs-devel@gnu.org>
Cc: "Danny Freeman" <danny@dfreeman.email>,
"Theodor Thornhill" <theo@thornhill.no>,
"Jostein Kjønigsen" <jostein@secure.kjonigsen.net>,
"Randy Taylor" <dev@rjt.dev>,
"Wilhelm Kirschbaum" <wkirschbaum@gmail.com>,
"Perry Smith" <pedz@easesoftware.com>
Subject: Re: Update on tree-sitter structure navigation
Date: Sun, 3 Sep 2023 03:56:03 +0300 [thread overview]
Message-ID: <8a5b3b3e-f091-3f38-09d4-c4e26bec97f9@yandex.ru> (raw)
In-Reply-To: <5E7F2A94-4377-45C0-8541-7F59F3B54BA1@gmail.com>
Hi Yuan,
On 02/09/2023 08:01, Yuan Fu wrote:
> - Solve the grammar versioning/breaking-change problem: tree-sitter grammar don’t have a version number, so every time the author changes the grammar, our queries break, and loading the mode only produces a giant error.
I don't have a better idea than basically copying NeoVim and others: to
maintain the urls to parser repositories and the ref of the latest known
good revision, for the current version of the major mode. That info
could be filled in by major modes themselves, e.g. in an autoload block
(similarly to how auto-mode-alist is appended to).
> Finally, feel free to send me an email or send to emacs-devel and CC me, if there are things treesit.c and treesit.el can do better, or when there are nice things in neovim and other editors and Emacs ought to have, too.
Something I mentioned previously, there is notion of scopes in
tree-sitter docs, see the Local Variables section here:
https://tree-sitter.github.io/tree-sitter/syntax-highlighting#local-variables
Basically to know which symbols are defined and for how long, the parser
needs additional help from the major mode author.
Neovim's definition here:
https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/ruby/locals.scm
next prev parent reply other threads:[~2023-09-03 0:56 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-02 5:01 Update on tree-sitter structure navigation Yuan Fu
2023-09-02 6:52 ` Ihor Radchenko
2023-09-02 8:50 ` Hugo Thunnissen
2023-09-02 22:12 ` Yuan Fu
2023-09-06 11:37 ` Ihor Radchenko
2023-09-08 0:59 ` Yuan Fu
2023-09-02 22:09 ` Yuan Fu
2023-09-06 11:57 ` Ihor Radchenko
2023-09-06 12:58 ` Eli Zaretskii
2023-09-08 12:03 ` Ihor Radchenko
2023-09-08 13:08 ` Eli Zaretskii
2023-09-08 1:06 ` Yuan Fu
2023-09-08 9:09 ` Ihor Radchenko
2023-09-08 16:46 ` Yuan Fu
2023-09-03 0:56 ` Dmitry Gutov [this message]
2023-09-06 2:51 ` Danny Freeman
2023-09-06 12:47 ` Dmitry Gutov
2023-09-07 3:18 ` Danny Freeman
2023-09-07 12:52 ` Dmitry Gutov
2023-09-08 1:04 ` Yuan Fu
2023-09-08 6:40 ` Eli Zaretskii
2023-09-08 20:52 ` Dmitry Gutov
2023-09-09 6:32 ` Eli Zaretskii
2023-09-09 10:24 ` Dmitry Gutov
2023-09-09 11:38 ` Eli Zaretskii
2023-09-09 17:04 ` Dmitry Gutov
2023-09-09 17:28 ` Eli Zaretskii
2023-09-12 0:36 ` Yuan Fu
2023-09-12 10:17 ` Dmitry Gutov
2023-09-08 21:05 ` Dmitry Gutov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8a5b3b3e-f091-3f38-09d4-c4e26bec97f9@yandex.ru \
--to=dgutov@yandex.ru \
--cc=casouri@gmail.com \
--cc=danny@dfreeman.email \
--cc=dev@rjt.dev \
--cc=emacs-devel@gnu.org \
--cc=jostein@secure.kjonigsen.net \
--cc=pedz@easesoftware.com \
--cc=theo@thornhill.no \
--cc=wkirschbaum@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.