From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter introduction documentation Date: Fri, 16 Dec 2022 17:56:49 +0000 Message-ID: <87zgbn2pwe.fsf@posteo.net> References: <83edszjslp.fsf@gnu.org> <36A73A67-2EF6-49C1-87CC-F8555B6DC020@easesoftware.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11040"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Eli Zaretskii , emacs-devel@gnu.org To: Perry Smith Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 16 18:57:50 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 1p6Exx-0002iH-KI for ged-emacs-devel@m.gmane-mx.org; Fri, 16 Dec 2022 18:57:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6Ex9-0003DW-Qb; Fri, 16 Dec 2022 12:56:59 -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 1p6Ex2-0003Cp-RX for emacs-devel@gnu.org; Fri, 16 Dec 2022 12:56:54 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6Ewy-0007By-RH for emacs-devel@gnu.org; Fri, 16 Dec 2022 12:56:51 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id EF1CC240049 for ; Fri, 16 Dec 2022 18:56:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1671213407; bh=BpRAhCVP9cMjrXKnUvZa8pDalVlgeox/L3wHzGM9An8=; h=From:To:Cc:Subject:Date:From; b=AaiVTIMiIPRk8eWo25nm3G9XVWLdBo3g6Bajuhz8OD7TTS5B9gJ+U9nHXGOtkfq8b 6NNM/fNz71O/fjVIud7KTYZlm4l7r9cfxULM7r/gB3Z6MoZkysP9THAAbfEi8aeyyM lgewkKTGNeU6px2eX5lQsuHyJG4IcXZiFOALYEjc6xxaiAA3boQJ9LluxAcr+90UvI oDopZj3tYV5lSB7AaRS2PGcUtb6xSC6uW5cfvITxeh77C5xzr/C92EU6fhIRatiBqi EVHSPL9+gcWclKn8tMZ8fXYSCMXn7tAvqcPMJNohO3CLYAbTamUPuBOAoaxYWxCdGP PbIyOP58ccsMw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NYcHL2QZcz9rxG; Fri, 16 Dec 2022 18:56:46 +0100 (CET) In-Reply-To: <36A73A67-2EF6-49C1-87CC-F8555B6DC020@easesoftware.com> (Perry Smith's message of "Fri, 16 Dec 2022 09:36:27 -0600") Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=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:301515 Archived-At: Perry Smith writes: >> On Dec 16, 2022, at 09:24, Jo=C3=A3o T=C3=A1vora = wrote: >>=20 >> On Fri, Dec 16, 2022 at 3:06 PM Eli Zaretskii wrote: >> > >> > > From: Perry Smith >> > > Date: Fri, 16 Dec 2022 08:47:18 -0600 >> > > >> > > There are (I believe) four pieces to get Tree Sitter major modes to = work. >> > > >> > > Emacs needs to be compiled with tree-sitter enabled >> > > The tree sitter binary needs to be installed >> > > The tree sitter language specific parser needs to be installed >> > > The appropriate major mode needs to be loaded and enabled >> > >> > That's correct. >>=20 >> I agree this is a problem, especially the language specific parser >> bits. Yesterday I tried out tree sitter Emacs on my Arch system. >> Finding the tree-sitter system lib was easy enough, but finding the C++ >> definition object wasn't so easy. Eventually I made it, but it needed >> compilation from source and a NodeJS toolchain that I didn't know >> I needed for that. > > This is new news to me. I downloaded this repository: > https://github.com/casouri/tree-sitter-module > > And did: ./build.sh Certainly this is not the intended way to get tree-sitter working, at least in the long term? I am not up-to-date with tree-sitter development in general, but is it planned for distributions to package the grammars and have them installed on a language-level? I don't suppose it would make sense for them to be distributed along with Emacs, or does it? > The same scripts are in the Emacs source down this path > admin/notes/tree-sitter/build-module > > Perry