emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter introduction documentation


From: Philip Kaludercic
Subject: Re: Tree-sitter introduction documentation
Date: Thu, 29 Dec 2022 11:14:08 +0000

Yuan Fu <casouri@gmail.com> writes:

>>> though considering that Emacs isn't the first editor with TreeSitter
>>> support, I wonder why this hasn't happened yet. 
>> 
>> My guess is lack of motivation on one side (most editors using
>> Tree-sitter already provide built-in support to automatically install
>> relevant grammars, which is even simpler (but not empowering) for the
>> end users since they don't need administrators access to install the
>> relevant grammars).
>> 
>> On the other side is probably the difficulty of packaging Rust and JS
>> libraries which tend to be horribly misbehaved w.r.t what distributions
>> expect (with things like vendoring or dependencies on very specific
>> versions of libraries).
>
> For tree-sitter, the dependency is pretty sane, with just node and a
> C/C++ compiler you can convert grammar.js to a loadable library.

Do you know how strong the dependency on node is?  As I said before, it
seems that it is possible to evaluate the grammar files that use the DSL
using something like quickjs as well, which is easier to build (or at
least I have bad experiences with installing tools around the Node
culture).  If grammar specifications really just stick to the DSL, then
this should be fine, but it appears that it should be possible for them
to also load arbitrary node.js libraries as well -- the node invocation
doesn't appear to inhibit this -- and complicate the process as well as
the building procedure as well.



reply via email to

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