From: Ihor Radchenko <yantar92@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: casouri@gmail.com, emacs-devel@gnu.org, danny@dfreeman.email,
theo@thornhill.no, jostein@secure.kjonigsen.net, dev@rjt.dev,
wkirschbaum@gmail.com, pedz@easesoftware.com, dgutov@yandex.ru
Subject: Re: Update on tree-sitter structure navigation
Date: Fri, 08 Sep 2023 12:03:58 +0000 [thread overview]
Message-ID: <87zg1w98i9.fsf@localhost> (raw)
In-Reply-To: <83v8cn1mse.fsf@gnu.org>
Eli Zaretskii <eliz@gnu.org> writes:
>> > Unifying tree-sitter and non-tree-sitter modes creates many problems. I’m rather thinking about some way to share some configuration between two modes. We’ve had many discussions before with no fruitful conclusion.
>>
>> Any chance you have links to these discussions?
>
> Here's one:
>
> https://lists.gnu.org/archive/html/emacs-devel/2022-12/msg01251.html
> https://lists.gnu.org/archive/html/emacs-devel/2022-12/msg01293.html
Thanks!
According to the discussion, the main problem is that interleaving
ts-related and ts-unrelated code in the same mode is risky. It is safer
to have a dedicated foo-ts-mode rather than modifying the existing
foo-mode.
However, separate *-ts- and *- modes create a problem when user config
tailored for old, non-ts mode will no longer work. For example,
c-ts-mode has `c-ts-mode-indent-offset', while cc-mode has
c-basic-offset in `c-style-alist'.
Ideally, user-facing API should be shared between the modes: defcustoms,
faces, and certain high-level functions like `c-set-style'.
One might slowly:
1. Add support of foo-mode's defcustoms to foo-ts-mode, when applicable
2. Create a shared API between foo-mode and foo-ts-mode that will call
the appropriate implementation depending on which mode is active.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
next prev parent reply other threads:[~2023-09-08 12:03 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 [this message]
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
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
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=87zg1w98i9.fsf@localhost \
--to=yantar92@posteo.net \
--cc=casouri@gmail.com \
--cc=danny@dfreeman.email \
--cc=dev@rjt.dev \
--cc=dgutov@yandex.ru \
--cc=eliz@gnu.org \
--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 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).