From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: chad Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter integration in python.el Date: Fri, 7 Oct 2022 13:53:57 -0400 Message-ID: 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> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000032847105ea757f19" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6290"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , Matthias Meulien , Eli Zaretskii , emacs-devel@gnu.org To: Augusto Stoffel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 07 19:55:55 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 1ogrZi-0001PJ-6v for ged-emacs-devel@m.gmane-mx.org; Fri, 07 Oct 2022 19:55:54 +0200 Original-Received: from localhost ([::1]:59012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogrZg-0000pt-G8 for ged-emacs-devel@m.gmane-mx.org; Fri, 07 Oct 2022 13:55:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogrY9-0008CM-C3 for emacs-devel@gnu.org; Fri, 07 Oct 2022 13:54:17 -0400 Original-Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]:36549) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogrY3-0004Iu-RG; Fri, 07 Oct 2022 13:54:17 -0400 Original-Received: by mail-ej1-x62e.google.com with SMTP id 13so12934787ejn.3; Fri, 07 Oct 2022 10:54:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Jv4KXzmh+pBM7O1BIOS6cx+ye+yXfC10+Vmn89Y+CqU=; b=orm9BJJoaFx9COX0aEob0GalkIrr4jcb0GVqz2kozcOTFOq2VLQDdj9bXXRmy6j8J4 Uz1rcVsrvb1CURTXlX3uiY3171ugClSfUE0BMO0BBFl33uV7vbkVXQnSLKgEbMs9j2gY P/CemrT5KLiais0wF7UlURBebgzX5zLMeTaYXZQRVyb9le76OK4d5wL8eJN4/4O6wdWP WX4OF6V5yalSeqyCvP1tZXVTD+CcBGq84QiX+Esz9C2OJFDJk9DccX1HyMefMtNB4wWS kXn6H1YSblJtc0dW1nouDFMYzU18tvtSUr94tDpghTKqq6cxpuWbe19/frWsVup14Pra vmIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Jv4KXzmh+pBM7O1BIOS6cx+ye+yXfC10+Vmn89Y+CqU=; b=wYA4KyKkCFi8zJlyAfJHaPLXcvl9VizEgp37jYgkjSGTQoul9XYMT/ui953JLI8zS5 4lYPRNmMkc0suIth7DTZJVgMG9QREn+VGcmKX6lWRpgDb1W/NyIj9uNrtLze8HLWBtjR 5sWuSG3F33pCYHAMSu9oRya4fmX8SwNCI+8oB+fdG5candXvZE+0n+9LkwpE4yY6G1as j1wg9Wacpg54yS99wBaYjin4C0N7C5gfA3Rdt0LfOwaI7OpI/yqjQnX8PYDm0n116rsx nZSLdX0Lspo3PIuWRfCst/t90OtsiaLXwN1dSmkMko/U5KqmULtU4ZcUIKOZVRswcsxV kCVg== X-Gm-Message-State: ACrzQf14pyYRSyzBIp9Ut6rEmRuRLYtNfCafB04tFed2DuxZbTCYrpnM 8tdRM5X84SEnwKsb1e1l/gzI1d/PmbLWwYkMaYE= X-Google-Smtp-Source: AMsMyM4FRw91XWkwP47I8QbCAvh3wM3dS+arryxz5WbnF18j2CbvwHRAEDfRz8ly/L4VNEWnvLrTjftHxzBnK8BHD70= X-Received: by 2002:a17:907:1b1f:b0:72f:56db:cce9 with SMTP id mp31-20020a1709071b1f00b0072f56dbcce9mr4849045ejc.605.1665165249642; Fri, 07 Oct 2022 10:54:09 -0700 (PDT) In-Reply-To: <87wn9c7xxd.fsf@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=yandros@gmail.com; helo=mail-ej1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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" Xref: news.gmane.io gmane.emacs.devel:297166 Archived-At: --00000000000032847105ea757f19 Content-Type: text/plain; charset="UTF-8" On Fri, Oct 7, 2022 at 6:07 AM Augusto Stoffel wrote: > Looking at the screenshots posted a few messages back, which are VERY > busy, I would really appreciate an option to disable a few fontification > rules or, conversely, disable all but a few of them. Ideally, this > should be done through a generic mechanism that works across major > modes. > I believe that history suggests that a better approach is "fontify everything and provide a setting that gives most of them the same appearance", assuming that the combination of tree-sitter and fontification is performant enough. This also enables some interesting features that were tried way back in the days of hilit19 like "transiently highlight everything of *this* type, but not all types". Somewhat like how isearch (occur, et al) can highlight literal duplicates, but based on shared semantic properties instead. I couldn't tell you offhand if the current tree-sitter performance for fontification is strong enough for this sort of thing or not, and I suspect the noverlay branch also has some impact here. Hope that helps, ~Chad --00000000000032847105ea757f19 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Fri, Oct 7, 2022 at 6:07 AM Augusto St= offel <arstoffel@gmail.com>= ; wrote:
Looking= at the screenshots posted a few messages back, which are VERY
busy, I would really appreciate an option to disable a few fontification rules or, conversely, disable all but a few of them.=C2=A0 Ideally, this should be done through a generic mechanism that works across major
modes.

I believe that history suggests = that a better approach is "fontify everything and provide a setting th= at gives most of them the same appearance", assuming that the combinat= ion of tree-sitter and fontification is performant=C2=A0enough. This also e= nables some interesting features that were tried way back in the days of hi= lit19 like "transiently highlight everything of *this* type, but not a= ll types". Somewhat like how isearch (occur, et al) can highlight lite= ral duplicates, but based on shared semantic properties instead.
=
I couldn't tell you offhand if the current tree-sitter p= erformance for fontification is strong enough for this sort of thing or not= , and I suspect the noverlay branch also has some impact here.
Hope that helps,
~Chad

--00000000000032847105ea757f19--