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 in python.el Date: Sun, 09 Oct 2022 07:13:22 +0300 Message-ID: <83pmf1k525.fsf@gnu.org> References: <3A68545C-2E40-4BB4-8563-8041A5452634@gmail.com> <87y1twlr0v.fsf@gmail.com> <83czb8ycpo.fsf@gnu.org> <87tu4klfcw.fsf@gmail.com> <87ill0le20.fsf@gmail.com> <87y1ttfmj8.fsf@gmail.com> <19950F30-F4DB-4CE4-9257-24DA39594669@gmail.com> <87czb47jya.fsf@gmail.com> <87wn9c7xxd.fsf@gmail.com> <83wn9altdu.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12976"; mail-complaints-to="usenet@ciao.gmane.io" Cc: arstoffel@gmail.com, orontee@gmail.com, emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Oct 09 06:14:38 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 1ohNi2-0003Bu-CW for ged-emacs-devel@m.gmane-mx.org; Sun, 09 Oct 2022 06:14:38 +0200 Original-Received: from localhost ([::1]:33736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohNi1-0005oe-02 for ged-emacs-devel@m.gmane-mx.org; Sun, 09 Oct 2022 00:14:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohNgm-0004UG-UZ for emacs-devel@gnu.org; Sun, 09 Oct 2022 00:13:21 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36228) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohNgm-0006yS-LL; Sun, 09 Oct 2022 00:13:20 -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=V+IvEv064q0rKGs1sy6TCqpGpMFgiYr9UULnz70Jw/Y=; b=Rl5A3+zq6MJT AZjQWnCyiI6hk/x4W9zITYd8QDQ9jdhPSVOl05C4XN86ILWiE+CiQdKP/WHeyFemrU0yNiknXBj3M JINFbkdxiLyyZxTUYzgbnuxPVZpjfyi0Q3p8+z8WepWSLJk1SSfvv//tkEswfWVVOwZy8Ql78VKdA eSX2k9IrtYlf1+bBcsTOIIUgxThEight2Mmr8rK1eGYZq+LnDF+dkpSB2dUv8iX+8Q+vVuqr2cWWI Igb9IThvx4hIl77a+U6ivGmACQ/aoKaZwZ4INsPf30pr2dxo/2K3uy01y/5WQtF49Zjo1zMn67Z0e IyQiBdsybvyMtS58bmv1Dw==; Original-Received: from [87.69.77.57] (port=4955 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 1ohNgm-0004ZR-2i; Sun, 09 Oct 2022 00:13:20 -0400 In-Reply-To: (message from Yuan Fu on Sat, 8 Oct 2022 13:57:19 -0700) 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:297239 Archived-At: > From: Yuan Fu > Date: Sat, 8 Oct 2022 13:57:19 -0700 > Cc: arstoffel@gmail.com, > orontee@gmail.com, > emacs-devel@gnu.org > > > I think having tree-sitter respect font-lock-maximum-decoration would > > be good, because it allows a major-mode agnostic way of controlling > > fontifications. With tree-sitter in mind, we'd need to agree on what > > kind of syntactic entities are included in each level (which is also a > > Good Thing, because currently what is level N of font-lock is entirely > > up to the major-mode, AFAIU). > > I think it is difficult to define syntactic entities for each level such that it is generally enough to include all kinds of major mode out there, and specific enough to be useful. It is easy for common programming languages, but hard for others like html, css, prolog, etc. I don't think it should be hard. At worst, we will find that HTML, CSS, etc. have fewer syntactic entities than programming languages, so maybe they will have fewer meaningful levels. > My impression of the levels are 1 for absolute minimum, 2 for moderate, and 3 for maximum. Right. > Perhaps rough guidelines like this could be more helpful than specifying syntactic entities for each level. We could come up with such guidelines, yes.