From: Roman Rudakov <rrudakov@fastmail.com>
To: Yuan Fu <casouri@gmail.com>
Cc: "T.V Raman" <raman@google.com>, emacs-devel@gnu.org
Subject: Re: tree-sitter and language support
Date: Fri, 25 Nov 2022 11:41:47 +0100 [thread overview]
Message-ID: <m24juntiob.fsf@Romans-MBP.home> (raw)
In-Reply-To: <6C4C266A-BC65-4486-80D1-1337A07CD6CF@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1744 bytes --]
Yuan Fu <casouri@gmail.com> writes:
>> On Nov 24, 2022, at 9:20 PM, T.V Raman <raman@google.com> wrote:
>>
>> I installed from elpa/melpa:
>>
>> ls -1 -d tree-sitter-*
>> tree-sitter-20220212.1632/
>> tree-sitter-langs-20221122.645/
>> 21:18:06 elpa $
>>
>> but emacs compiled from latest Git Head still produces the
>> completely
>> unhelpful message
>> tree-support for language <x> is unavailable if I invoke c-ts-mode
>> or
>> c++-ts-mode
>>
>> A note in the News file detailing what bits one needs to install
>> might
>> be the shoes we need to help us walk the final mile on this long
>> road
>> to tree-sitter integration.
>
> 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? I use MacOS, I've built
a grammar for java using custom homebrew formula, it produces the file
/opt/homebrew/lib/libtree-sitter-java.dylib, but when I open any java
source file and try to activate java-ts-mode, I'm getting the error:
Warning (treesit): Cannot activate tree-sitter, because language
definition for java is unavailable (not-found):
(libtree-sitter-java.so libtree-sitter-java.dylib) No such file or
directory
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.
--
Best regards, Roman
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
next prev parent reply other threads:[~2022-11-25 10:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-25 5:20 tree-sitter and language support T.V Raman
2022-11-25 6:51 ` Yuan Fu
2022-11-25 10:41 ` Roman Rudakov [this message]
2022-11-25 12:05 ` Eli Zaretskii
2022-11-25 17:57 ` T.V Raman
2022-11-25 19:48 ` Eli Zaretskii
2022-11-25 12:28 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m24juntiob.fsf@Romans-MBP.home \
--to=rrudakov@fastmail.com \
--cc=casouri@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=raman@google.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).