all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Yuan Fu <casouri@gmail.com>
Cc: tsdh@gnu.org, raman@google.com, emacs-devel@gnu.org
Subject: Re: tree-sitter version?
Date: Fri, 25 Nov 2022 13:52:28 +0200	[thread overview]
Message-ID: <83k03juu83.fsf@gnu.org> (raw)
In-Reply-To: <8B97AC7B-54CF-41AC-9EF7-0A83F1709B98@gmail.com> (message from Yuan Fu on Fri, 25 Nov 2022 01:43:39 -0800)

> From: Yuan Fu <casouri@gmail.com>
> Date: Fri, 25 Nov 2022 01:43:39 -0800
> Cc: "T.V Raman" <raman@google.com>,
>  emacs-devel@gnu.org
> 
> > BTW, how can a user decide that tree-sitter modes should be used?  For
> > example, when I open a json file I get js-json-mode, not json-ts-mode,
> > which also works, so support is available.  Should user's augment
> > auto-mode-alist?  Or is there some "enable TS whenever possible and the
> > devs think its support is in a usable state for that language" toggle?
> 
> There is no global toggle, unfortunately. You could use auto-mode-alist or major-mode-remap-alist to enable tree-sitter modes, yes. I imagine there could be a third-party package that automatically enables tree-sitter for all supported nodes, maybe.

I'm not sure a global toggle would make sense at this time: even if the user
has the tree-sitter library installed, there's no guarantee that the grammar
for a particular language is also installed.  Only the user knows whether it
is or isn't.  Enabling a mode just to get an error message makes little
sense.

Perhaps in the future distros will catch up and provide installation of
grammars that includes everything available, but until they do, we are
better off with individual toggles.

There's also a question of user preferences: some might prefer the
non-TS versions for whatever reasons.

IMO, per-mode toggles is currently the best compromise, given that we don't
yet have enough user feedback and experience to decide on more general
knobs.



  reply	other threads:[~2022-11-25 11:52 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24  1:54 tree-sitter version? T.V Raman
2022-11-24  3:27 ` Yuan Fu
2022-11-24  4:57   ` T.V Raman
2022-11-24  5:02     ` Yuan Fu
2022-11-24  5:54       ` Tassilo Horn
2022-11-25  9:43         ` Yuan Fu
2022-11-25 11:52           ` Eli Zaretskii [this message]
2022-11-25 15:08           ` T.V Raman
2022-11-25 16:25             ` Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?) Daniel Martín
2022-11-25 16:33               ` Eli Zaretskii
2022-11-25 16:38               ` Theodor Thornhill
2022-11-25 17:50                 ` Elliott Shugerman
2022-11-25 23:41                   ` Rudolf Adamkovič
2022-11-25 19:40                 ` Eli Zaretskii
2022-11-25 19:58                   ` Theodor Thornhill
2022-11-25 20:13                     ` Theodor Thornhill via Emacs development discussions.
2022-11-26  1:04                       ` Stefan Kangas
2022-11-26  6:45                         ` Theodor Thornhill
2022-11-26  8:20               ` Yuan Fu
2022-11-26  8:22                 ` Theodor Thornhill
2022-11-26  8:31                 ` Eli Zaretskii
2022-11-26  9:06                   ` Theodor Thornhill
2022-11-28 21:36             ` tree-sitter version? Richard Stallman
2022-11-29  3:28               ` Eli Zaretskii
2022-12-04 23:13                 ` Richard Stallman
2022-12-05  3:27                   ` Eli Zaretskii
2022-12-06 22:35                     ` Richard Stallman
2022-12-07  3:31                       ` Eli Zaretskii
2022-11-25 15:06         ` T.V Raman

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=83k03juu83.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=casouri@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=raman@google.com \
    --cc=tsdh@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 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.