From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Noah Peart Newsgroups: gmane.emacs.bugs Subject: bug#71209: [PATCH] Add font-locking for variables in go-ts-mode range clauses Date: Fri, 31 May 2024 19:04:58 -0700 Message-ID: References: <269722b9-1dcd-47e5-8f60-e8a2ff273259@gutov.dev> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000a457760619ca87f7" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39957"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71209@debbugs.gnu.org, Randy Taylor To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 01 04:07:08 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1sDE9D-000ABF-W6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Jun 2024 04:07:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sDE8y-0003je-8n; Fri, 31 May 2024 22:06:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDE8w-0003iv-OI for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 22:06:50 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sDE8w-0002Dg-G2 for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 22:06:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sDE97-0008Mo-Qz for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 22:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noah Peart Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Jun 2024 02:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71209 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71209-submit@debbugs.gnu.org id=B71209.171720759232123 (code B ref 71209); Sat, 01 Jun 2024 02:07:01 +0000 Original-Received: (at 71209) by debbugs.gnu.org; 1 Jun 2024 02:06:32 +0000 Original-Received: from localhost ([127.0.0.1]:55542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDE8d-0008M3-VF for submit@debbugs.gnu.org; Fri, 31 May 2024 22:06:32 -0400 Original-Received: from mail-oa1-f50.google.com ([209.85.160.50]:43394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDE8Z-0008Ll-2O for 71209@debbugs.gnu.org; Fri, 31 May 2024 22:06:31 -0400 Original-Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-250af9b3a13so37249fac.1 for <71209@debbugs.gnu.org>; Fri, 31 May 2024 19:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717207510; x=1717812310; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=X9QQ4rHlUNzrEhSVmJFzqM06ZW0bVHPxzEl6ZnEFDeE=; b=fwhSj2toadqla2d8UXiGkVIzi5L57ekuCFFHmKDPoQE6ZTcIW+5sb678GQg9zBXW9A V1ZLuDvxk4CXI1Ol2llezLZgCKsRqI0aBsGsJ11x4XLcy3jylIiRwfFAg5+Zs39q/k3x K4N110dZOMtEyAOYHZuXf8q4OExdEsDSrqHs82V1o0S/1R2b2DUiqAbeImrbWHiENw5r aXs9uhMmuZ00tWjm8fBqpSf0tyQli/JxMbQgJGxrWspAEZeDfMB1cf6ZKFC7AQzmBbc2 R1K1wxjAPttoKgRAtgFObb5dBkhRmX0Ap1sTHgTA9hplo0bg7MQf50IN0jy9C1BwvXKZ I0Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717207510; x=1717812310; 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=X9QQ4rHlUNzrEhSVmJFzqM06ZW0bVHPxzEl6ZnEFDeE=; b=DvV6hmAADXQHFPWEtbDmY7NXJhm/TxYhzD+pJIQDyY/bLuNpjRSQA//ngOpKCZRi5f VfIpoGDZnppBdEvD/7EMhTUKwwK8T4fW6/U7UXqkcgna5dgSUgFstsWF2Z2HWM6FXdVQ IZuClNjfrlfvhyfSVSAgK1blY/iExC6khI/0LQJMbJUIqEl2HwChzr0N0HfoQNkeVXlY Kxp2T0wGPvPlq+TGFuWBbcUBgALTsNGLtMHfTXcEcr3hvHLJ96VLCPwM5dVXiE6ftnt1 gvGs7n/Pcw2MbC2KLRoJaPJBnC/ccjrp5r2+teS/+kG7gehm+Aqw5SMZodKk8DvbA3Fs RNew== X-Forwarded-Encrypted: i=1; AJvYcCXjJCsKG2FnKNeRMZDq+2d13FeLKWgvNIEeucWJMbI7LDnwbB9gOaKumGrpU4Am8xblFUcAJ+YnXya5pdOuViaS+llYJqw= X-Gm-Message-State: AOJu0YxJRUIJWhCdqDUsve2fNuZfEJM9Cm4WIo7G2nyiWdTU8WwRweXR 9iqTTGsjtY229vCOvGe3wKNSrPnyKenGgUkTWONoqlqebjk0E/2l2Dd4B/+tHdyGk6dMdrZF3t4 2Ib0P3MWTsKUuIo4ADhdDLDKW1qvDF2SZdsBlpA== X-Google-Smtp-Source: AGHT+IGprW4RqM42Rv3tFD5bAmigLP9IaXOuVxVvGKvagafhDNzflfpTV+CzCWrwSBRb7xYbg/gPFr7JPfQwIR1alhA= X-Received: by 2002:a05:6870:440b:b0:24d:e843:2966 with SMTP id 586e51a60fabf-25065ad7153mr2734168fac.6.1717207510044; Fri, 31 May 2024 19:05:10 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286312 Archived-At: --000000000000a457760619ca87f7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > Personally, I stay with the default, among other things because most of > the level 4 'variable' highlights just take the easy route and highlight > all the tokens that haven't been matched by any other existing rule. > That doesn't feel useful to me. I agree, I used level 4 with the use-face and name-faces being the same for while, but have since changed use-faces to be only a shade different from the default face. It's way more informative to have the decls solidly stand out. On Fri, May 31, 2024 at 6:59=E2=80=AFPM Dmitry Gutov wro= te: > On 01/06/2024 04:56, Noah Peart wrote: > > > Only if you set treesit-font-lock-level to 4, right? > > > > Yea, that's true - I assumed most people(?) do, but I just realized > > I hadn't been doing that for years until tree-sitter - and now I've > > become obsessive compulsive about my fonts. > > I imagine most actual users just keep in on the default value. But a lot > customize it, of course, to get closer to "VS Code look". > > Personally, I stay with the default, among other things because most of > the level 4 'variable' highlights just take the easy route and highlight > all the tokens that haven't been matched by any other existing rule. > That doesn't feel useful to me. > --000000000000a457760619ca87f7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> Personally, I stay with the default, among other thin= gs because most of
> the level 4 'variable' highlights just t= ake the easy route and highlight
> all the tokens that haven't be= en matched by any other existing rule.
> That doesn't feel useful= to me.

I agree, I used level 4 with the use-face and name-faces be= ing the same
for while, but have since changed use-faces to be on= ly a shade different
from the default face.=C2=A0 It's way mo= re informative to have the decls=C2=A0solidly
stand out.

On = Fri, May 31, 2024 at 6:59=E2=80=AFPM Dmitry Gutov <dmitry@gutov.dev> wrote:
On 01/06/2024 04:56, Noah Peart wrote:
>=C2=A0 > Only if you set treesit-font-lock-level to 4, right?
>
> Yea, that's true - I assumed most people(?) do, but I just realize= d
> I hadn't been doing that for years until tree-sitter - and now I&#= 39;ve
> become obsessive compulsive about my fonts.

I imagine most actual users just keep in on the default value. But a lot customize it, of course, to get closer to "VS Code look".

Personally, I stay with the default, among other things because most of the level 4 'variable' highlights just take the easy route and high= light
all the tokens that haven't been matched by any other existing rule. That doesn't feel useful to me.
--000000000000a457760619ca87f7--