From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter integration on feature/tree-sitter Date: Sun, 08 May 2022 17:42:39 +0300 Message-ID: <83mtfsuluo.fsf@gnu.org> References: <5bada349-2f43-4325-b696-70918584cd3d@email.android.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38948"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, casouri@gmail.com, emacs-devel@gnu.org To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 08 16:43:26 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 1nni85-0009z2-SD for ged-emacs-devel@m.gmane-mx.org; Sun, 08 May 2022 16:43:25 +0200 Original-Received: from localhost ([::1]:45094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nni84-0006XI-TS for ged-emacs-devel@m.gmane-mx.org; Sun, 08 May 2022 10:43:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nni7T-0005po-13 for emacs-devel@gnu.org; Sun, 08 May 2022 10:42:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nni7S-0005mr-DN; Sun, 08 May 2022 10:42:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=FJvYCta0GKf3ln7JQOqBH0uw5SI7OAVT/qKhTWzGCwE=; b=Kuv1ISOhGsXH XOnVpBhuxt84XcQdNngOVfvpXZSvNqgLizPIEWUjq4QcEf9GX+cMpZ2bPs39ciOD1Tfp3RLJyzm+v oENwMobfmgTg9Hvx74PcFCPnHAqlxvd7g4d6ADmBpxfldqRZ2dcmKgLgX7EiOiKnb/uKlyeZqpyLd ag1pvTPxK0tRqPYwunMW2tvo2Z6RiWEBfZ2FwLfO96Jk0/JzlDxDVIe+rwV8Pqve77uSeC6kMFE7E PkURR+ecavSIg/KtHUH/z+8pcyp415CJsrrk0TJ5eikIZrgmXoBNw2gb/mueRmuh82IWbqE1Su+Us M8aCJ5969czbR1cX1P168A==; Original-Received: from [87.69.77.57] (port=2865 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nni7R-0008G8-TE; Sun, 08 May 2022 10:42:46 -0400 In-Reply-To: <5bada349-2f43-4325-b696-70918584cd3d@email.android.com> (message from Theodor Thornhill on Sun, 08 May 2022 16:25:43 +0200) 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" Xref: news.gmane.io gmane.emacs.devel:289486 Archived-At: > Date: Sun, 08 May 2022 16:25:43 +0200 > From: Theodor Thornhill > Cc: Eli Zaretskii , casouri@gmail.com, emacs-devel@gnu.org > > The way I understand it, to use TS for a given language, you need: > - The TS runtime (which should be included in Emacs if you use the > corresponding feature branch and which include what I'd called "the > incremental parser"). > - The language's grammar. This is usually a .js file and is compiled to > an .so file by the tree sitter tools. This is *not* included in the > feature branch (neither the grammars nor the tools). > - The glue in the major mode code. > > Yes, and the tree-sitter-module repo provides a way to compile these grammar.js files into an object emacs > understands. My understanding was that tree-sitter can load these *.js parsers as they are downloaded from the respective sites, or that there are tools available to compile them if needed. Why cannot we leave it to users to do that by themselves, instead of using an Emacs module?