emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tree-sitter version?


From: T.V Raman
Subject: Re: tree-sitter version?
Date: Fri, 25 Nov 2022 07:06:24 -0800

So I built the lang-specific modules from the script cited earlier in
the thread and copied the .so files to /usr/local/lib emacs seems
happy, but at least it doesn't complain about not knowing about C.

But for this to be usable, those modules need to be bundled with Emacs?Tassilo 
Horn writes:
 > 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.
 > 
 > 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?
 > 
 > Bye,
 > Tassilo

-- 

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  🦮



reply via email to

[Prev in Thread] Current Thread [Next in Thread]