emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter integration on feature/tree-sitter


From: Eli Zaretskii
Subject: Re: Tree-sitter integration on feature/tree-sitter
Date: Mon, 09 May 2022 14:14:26 +0300

> From: Theodor Thornhill <theo@thornhill.no>
> Cc: monnier@iro.umontreal.ca, casouri@gmail.com, emacs-devel@gnu.org
> Date: Sun, 08 May 2022 21:16:00 +0200
> 
> Oh right, now I understand.  The tree sitter implementation doesn't use
> an Emacs module any longer.  It uses the language definitions libraries
> like any other editor.  If you use the tree-sitter-module script you
> should use the 'batch-new.sh' script. This only creates a .so file.  My
> guess is that you could use any guide on the internet to compile such a
> shared object, then use it in emacs.  It seems to be a bit picky on the
> naming; it needs to be called 'libtree-sitter-LANG.so', which should
> probably be documented somewhere.  I cannot see that it is, yet.
> 
> So in short: Emacs cannot load the .js directly, but when downloaded
> they should be compiled to a .so/.dll/.dylib and put somewhere emacs can
> see it, such as ~/.emacs.d/tree-sitter.  This could be left to the user,
> but it would be nice for emacs to do this, or at least a package in
> elpa/nongnu elpa that does this so that the barrier of entry isn't too
> high.
> 
> I think I understood your concern now, does this answer help?

Yes, it does, thanks.

However, I don't think I see the need to have in Emacs or ELPA
something that helps building shared libraries from the
language-specific parser files.  The parsers themselves and the way to
build them are outside of the Emacs scope.  And since building a
shared library is not really complicated, and I presume there are
prebuilt shared libraries available, it sounds like a simple job, if
at all.



reply via email to

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