From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Roman Rudakov Newsgroups: gmane.emacs.devel Subject: Re: tree-sitter and language support Date: Fri, 25 Nov 2022 11:41:47 +0100 Message-ID: References: <6C4C266A-BC65-4486-80D1-1337A07CD6CF@gmail.com> Reply-To: rrudakov@fastmail.com Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23345"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.11; emacs 29.0.50 Cc: "T.V Raman" , emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 25 11:48:24 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oyWFq-0005pD-SL for ged-emacs-devel@m.gmane-mx.org; Fri, 25 Nov 2022 11:48:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyWF0-0004Fr-D4; Fri, 25 Nov 2022 05:47:31 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyWEy-0004FT-7n for emacs-devel@gnu.org; Fri, 25 Nov 2022 05:47:28 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyWEw-00047L-Bh for emacs-devel@gnu.org; Fri, 25 Nov 2022 05:47:27 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id BDEF25C00B6; Fri, 25 Nov 2022 05:47:23 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 25 Nov 2022 05:47:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:reply-to:sender :subject:subject:to:to; s=fm1; t=1669373243; x=1669459643; bh=iJ OC6xnWJ4gMEqcE5AypCqVr9wWzZar0hNBp5vNoEUg=; b=PS3zAjzrDIg7nWglfU DtnqmAKL7/7m/Nr2F0jrrSG/t9XkcGn/3iGTBK9IW7NJq0+ZPuxmJ1mY6wJBLZ17 qbKpuXr0e/JQHaJkSNTTQPpHzHPPkhvHWFMpBvbxF8vItQ0m5CQ2YJ+PDFoqObzN zzZD+ovVFG5DhR4I/TeSionaTTb3/CEIHirAaUoa1kjCDM47i9RpQMdr8lWATquf Wn6tcoR563VxDwv+4ks1ocwQJvQ1DW53qjVHp87gbsgCsr402p4JSjLcBo1dbtbc UkFsvaD27Gm1FZ1ojkZb5mxjmcTxeySHig5M9VCbt7FXSlIrIbdorXE9ANfG/HMD bMTw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1669373243; x=1669459643; bh=iJOC6xnWJ4gME qcE5AypCqVr9wWzZar0hNBp5vNoEUg=; b=o5PJrOBKSqH14lJn2NOfr4A+rRNOu Ecf6zWoNxK/iYQ19otTTQiyBWByOaPZj9mfLLruCdpA90Gwwt1MlrJLjspFnZxT1 O2j2UaiJkEMkx9xvralH0TTGr9ZWykiEnzud4Rgghnx8VOMK7KZ1zZcMGtz9xZcU 6wZnWCHQCcFLMQ1NTXhzli+rYbt/BWqnCo/cSdVqgoDPcWajYzDfPZaOLTXoWweu bWJVv0HaOkL7dafBDZG8eSHRuKc7lZgM2Kgkda0OC7pYV+sI1LxAq/fT9SqahdZu VzhIZFgBeOCJ1tw+9Br+w/V8XRW3ppc8I+ppAtYjBLjvxC64g8i41bMqw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrieehgddvtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpehffgfhvfevufffrhgjkfggtgesghdtreertderjeenucfhrhhomheptfhomhgr nhcutfhuuggrkhhovhcuoehrrhhuuggrkhhovhesfhgrshhtmhgrihhlrdgtohhmqeenuc ggtffrrghtthgvrhhnpeeivdevfeehffeggfeikedvhffhudelffejtddvfedvgefhgfdu ueetudfgtdekleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehrrhhuuggrkhhovhesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: i1c714620:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Nov 2022 05:47:22 -0500 (EST) In-reply-to: <6C4C266A-BC65-4486-80D1-1337A07CD6CF@gmail.com> Received-SPF: pass client-ip=66.111.4.25; envelope-from=rrudakov@fastmail.com; helo=out1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300475 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Yuan Fu writes: >> On Nov 24, 2022, at 9:20 PM, T.V Raman 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=20 >> completely >> unhelpful message >> tree-support for language is unavailable if I invoke c-ts-mode=20 >> or >> c++-ts-mode >> >> A note in the News file detailing what bits one needs to install=20 >> might >> be the shoes we need to help us walk the final mile on this long=20 >> road >> to tree-sitter integration. > > We are just starting to work on tree-sitter=E2=80=99s user-facing > documentation, including the (emacs) manual and NEWS file. I=E2=80=99ll > definitely improve the error message. In the meantime, find files=20 > 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=20 a grammar for java using custom homebrew formula, it produces the file=20 /opt/homebrew/lib/libtree-sitter-java.dylib, but when I open any java=20 source file and try to activate java-ts-mode, I'm getting the error: Warning (treesit): Cannot activate tree-sitter, because language=20 definition for java is unavailable (not-found):=20 (libtree-sitter-java.so libtree-sitter-java.dylib) No such file or=20 directory I can fix it by adding /opt/homebrew/lib to treesit-extra-load-path,=20 but I'm wondering how to install grammar properly to avoid setting=20 this variable. =2D- Best regards, Roman --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIwEARYKADQWIQQP/o1ubG6gfJMhsX+CGN9kW8pzwQUCY4CdNBYccnJ1ZGFrb3ZA ZmFzdG1haWwuY29tAAoJEIIY32RbynPBf2YA+wf4Dp7IiKqgSCuIE7hiug676cmR SCU/AhqyG4tP9CuLAP9pJmzSGKbmPWgmdUPhdcm8yoQk33FqOQ7egG4tK73jBA== =FkLo -----END PGP SIGNATURE----- --=-=-=--