emacs-devel
[Top][All Lists]
Advanced

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

Re: tree-sitter and language support


From: Eli Zaretskii
Subject: Re: tree-sitter and language support
Date: Fri, 25 Nov 2022 14:05:48 +0200

> From: Roman Rudakov <rrudakov@fastmail.com>
> Cc: "T.V Raman" <raman@google.com>, emacs-devel@gnu.org
> Date: Fri, 25 Nov 2022 11:41:47 +0100
> 
> > We are just starting to work on tree-sitter’s user-facing
> > documentation, including the (emacs) manual and NEWS file. I’ll
> > definitely improve the error message. In the meantime, find files 
> > that
> > looks like libtree-sitter-xxx.so and put them under
> > ~/.emacs.d/tree-sitter (or a standard library location like
> > /usr/local/lib), and Emacs should be able to find them.
> >
> > Yuan
> 
> Hi Yuan!
> 
> I have a question. Are these paths hardcoded?

This is Emacs; how can you assume such hard-coded paths are even possible?

Of course, they aren't hard-coded!  Emacs looks in the standard directories
for shared libraries, then in user-emacs-directory, then in the directories
mentioned in treesit-extra-load-path.

> I can fix it by adding /opt/homebrew/lib to treesit-extra-load-path, 
> but I'm wondering how to install grammar properly to avoid setting 
> this variable.

Adding this to treesit-extra-load-path is fine.  Alternatively, install the
shared library where you have the other shared libraries on your system
(a.k.a. "standard places").



reply via email to

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