From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter integration in python.el Date: Fri, 7 Oct 2022 15:17:25 -0700 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 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) 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="27380"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Augusto Stoffel , Matthias Meulien , Eli Zaretskii , emacs-devel@gnu.org To: chad Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 08 00:18:19 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 1ogvff-0006yw-1A for ged-emacs-devel@m.gmane-mx.org; Sat, 08 Oct 2022 00:18:19 +0200 Original-Received: from localhost ([::1]:46416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogvfd-0007fo-DL for ged-emacs-devel@m.gmane-mx.org; Fri, 07 Oct 2022 18:18:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogvet-0006ys-1I for emacs-devel@gnu.org; Fri, 07 Oct 2022 18:17:31 -0400 Original-Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:45718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogveq-0005Ou-Mg; Fri, 07 Oct 2022 18:17:30 -0400 Original-Received: by mail-pf1-x432.google.com with SMTP id 67so6018281pfz.12; Fri, 07 Oct 2022 15:17:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=IjncdN7i403Oirwre1vcgVFBKq3Z+NjjT55duJS2GFQ=; b=A3UVn3B/Acl9r3BzFJQ8OkKo+nMwALg3sgbbxraEfWcv0K0Lgx74/MZf+ZxJdXshi6 ILZzhN3GUrgQotVcWcIBjPLks0vfmcEjl4gadDat48wUKdpkVRYpAoNnusplzXIGtAiq AODsgFtPR7wdL1WoyyBcz/HBQh6ZEXYmr0M9ynjpNZJoJUwgPmrcqAhTIlTW093Luw6e ZEKb5tCeXR+WPobePgO1OsnbWO2ryquhKUXG6Ewa4A1bbsWlVEYzE7IKYWoRmzm8kSqu HB09UwzgzWqS2451kyoie/mipPrI9gCk0iD3A2ZGlh3Stty/iFQ2wwxje0yU9aB+Ypg5 38gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IjncdN7i403Oirwre1vcgVFBKq3Z+NjjT55duJS2GFQ=; b=fM08FnI9FnQjF+h2m6yEJRW590wKZCD5LN6YwcoiaqJKznWD+hDHJatNPIyUhlo+GX MkH+4umuX5WoupRVq8PGGTHzaz1QTw0QkYB9MLQLDhR6L3mZxsPDBCK1gCStpbShQb/2 JhhCZyVWAmEkI53GQRF4bqipf7gSO4dVqfEI5sapUKAhlKnA6oNch9phSp6iQV+Nu2o7 cz9Q4hAMOuCM6Jgv0VIpkX1h0ja4/X/5rd/ZHl4d8YzM/yIODNRCPTXBjTZ1s222BvPs y7tBOWIOf30r99VZdshL7pAK46BWU5uvuRrSl9Ri3uWAEtHZd/uZEmSIm+npXgOmO0S7 bwcA== X-Gm-Message-State: ACrzQf3H4rsOcNk/eDjMMyAiI+gtXktXW7AQQ/pc3CUeTTsHzA3ZFsKN qWIjh5OkXNuIP/WvADCmd2UkDb2f5tw= X-Google-Smtp-Source: AMsMyM4QEvEu6MVPU+r8TE1/FIZWFMZ8/E//oWMYkdBTadsimmwgn/QDPf4rZf7ZakAv0oE4OVZnFQ== X-Received: by 2002:a05:6a00:88f:b0:52c:6962:274f with SMTP id q15-20020a056a00088f00b0052c6962274fmr7609764pfj.12.1665181046869; Fri, 07 Oct 2022 15:17:26 -0700 (PDT) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id b2-20020a170902ed0200b00176d347e9a7sm1955031pld.233.2022.10.07.15.17.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Oct 2022 15:17:26 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=casouri@gmail.com; helo=mail-pf1-x432.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, 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:297173 Archived-At: > 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. I think toggling on/off is easier for the users to understand and = configure. > 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. You mean =E2=80=9Ctransiently highlight all variable names=E2=80=9D? = What would be a use-case of that? I=E2=80=99m only aware of =E2=80=9Chighl= ight all appearance of _this_ variable=E2=80=9D, which is provided by = IDEs and LSP. > 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. Tree-sitter is pretty fast and we don=E2=80=99t need to worry about = =E2=80=9Ctoo-much fontification=E2=80=9D. Yuan=