all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "T.V Raman" <raman@google.com>
To: casouri@gmail.com
Cc: tsdh@gnu.org, raman@google.com, emacs-devel@gnu.org
Subject: Re: tree-sitter version?
Date: Fri, 25 Nov 2022 07:08:07 -0800	[thread overview]
Message-ID: <25472.55895.937365.654317@retriever.mtv.corp.google.com> (raw)
In-Reply-To: <8B97AC7B-54CF-41AC-9EF7-0A83F1709B98@gmail.com>

also the   name "ts" as part of tree-sitter is an unfortunate
confusion since ts-mode is for typescript.

I initally wrongly assumed that ts-mode was some kind of global mode
that would enable tree-support for all supported modes, given the
names c-ts-mode etc.Yuan Fu writes:
 > 
 > 
 > > On Nov 23, 2022, at 9:54 PM, Tassilo Horn <tsdh@gnu.org> wrote:
 > > 
 > > Yuan Fu <casouri@gmail.com> writes:
 > > 
 > > Hi Yuan,
 > > 
 > >>> So: am I supposed to install tree-sitter from github or from debian's
 > >>> package manager?
 > >> 
 > >> Either should be fine.
 > > 
 > > Ah, I was wondering the same when I wanted to give tree-sitter a try.  I
 > > have tree-sitter 0.20.7 installed but the configure output said
 > > ">=0.20.2 no" but only reported a >= 0.6.x version.  It still works
 > > fine. :-)
 > > 
 > >>> I first did the package-manager version, then pulled from github and
 > >>> installed that -- configure shows that tree-sitter is detected -- but
 > >>> calling any of the tree-sitter modes, eg c-ts-mode barfs with an
 > >>> error saying that support is not available.
 > >> 
 > >> If you call tree-sitter-available-p, what do you get? Most likely you
 > >> don’t have the relevant language definition/grammar for those
 > >> modes. You can probably find them on package managers, or you can
 > >> build with the script here:
 > > 
 > > Indeed, that was the next trap I fell in.  On Arch, tree-sitter is in
 > > the community repository (so basically almost official) whereas the
 > > language definitions are only on the AUR.  Maybe the NEWS entry should
 > > tell more clearly that tree-sitter needs to be system-installed and also
 > > the language definitions need to be grabbed somewhere.
 > 
 > Yeah there will be a NEWS entry for tree-sitter.
 > 
 > > 
 > > 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.
 > 
 > Yuan
-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮

--

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮



  parent reply	other threads:[~2022-11-25 15:08 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
2022-11-25 15:08           ` T.V Raman [this message]
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=25472.55895.937365.654317@retriever.mtv.corp.google.com \
    --to=raman@google.com \
    --cc=casouri@gmail.com \
    --cc=emacs-devel@gnu.org \
    --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.