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: Call for volunteers: add tree-sitter support to major modes Date: Sun, 09 Oct 2022 16:25:17 +0300 Message-ID: <837d19jfia.fsf@gnu.org> References: <83czb1jrm3.fsf@gnu.org> <87v8ot2nfi.fsf@posteo.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="942"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, casouri@gmail.com To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Oct 09 15:26:51 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 1ohWKR-000Adi-1Y for ged-emacs-devel@m.gmane-mx.org; Sun, 09 Oct 2022 15:26:51 +0200 Original-Received: from localhost ([::1]:54230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohWKP-0004my-KL for ged-emacs-devel@m.gmane-mx.org; Sun, 09 Oct 2022 09:26:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohWIs-0003c1-1F for emacs-devel@gnu.org; Sun, 09 Oct 2022 09:25:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46010) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohWIr-0001tE-2s; Sun, 09 Oct 2022 09:25:13 -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=hDssLGuo5q4pFFtHP4akHLppTfJFU9yfZS4uf4ixfxc=; b=bEab6bZFDXJj hQxs94T8NPqN5Iilp+stnP8q0UI6BzMbW8UIX1R0gtlodkuQDzR38eHV2wSUbW8No+XNPXICtNmAQ 9xexVaETe09BZHXdz8dRRzx7t2g/A1zb40pO9WYtECLbevfgN9GTySzZbIb/5ev7sWfv3o2tt76Ys r+qy3lrwxZI2MXlS78e3rpT3GS7z7VRX92AH1vVm6eNCBjw1CuNmC2FPGEfu2YDDgxwDJmdPie2QH YDcbYLAQSZcZ2CrFmM9giso90bDn+Ex7VHiP41mGssvhZnDauPhF/1jFPrDRW8KgZpsu0Bzt0y4J4 +xNTzd4ZX+p/qlLNdltSGg==; Original-Received: from [87.69.77.57] (port=3911 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 1ohWIq-00064r-IE; Sun, 09 Oct 2022 09:25:12 -0400 In-Reply-To: <87v8ot2nfi.fsf@posteo.net> (message from Philip Kaludercic on Sun, 09 Oct 2022 12:26:09 +0000) 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:297260 Archived-At: > From: Philip Kaludercic > Cc: emacs-devel@gnu.org, Yuan Fu > Date: Sun, 09 Oct 2022 12:26:09 +0000 > > > emacs-lisp-mode > > How much of a priority is using tree sitter for Emacs Lisp? It appears > that this[0] is the grammar implementation, and it currently doesn't > support the following: > > Autoload cookies > Definitions (e.g. defun, defvar, defmacro) > > As far as I understand, this means that from your list of enhanced > features, the following will either be restricted or not work at all: > > - font-lock > - indentation > - imenu > - which-func If emacs-lisp-mode cannot be reasonably supported, we can omit it for now. > Also, when taking a look at the current implementation for Python[1][2], > I cannot but wonder if a few high-level functions/macros should be added > first to make it easier. > > One more thing, it looks like the usage of tree-sitter is enabled for > python by toggling `python-use-tree-sitter'. Will every mode now have > this kind of an option? I would hope not... > > [0] https://github.com/Wilfred/tree-sitter-elisp > [1] https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/python.el?h=feature/tree-sitter#n953 > [2] https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/python.el?h=feature/tree-sitter#n5324 That's a separate discussion, so please start a new thread.