From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Randy Taylor Newsgroups: gmane.emacs.bugs Subject: bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum Date: Sat, 16 Mar 2024 01:37:34 +0000 Message-ID: References: <36fGsZdSJ-V_6XVD6SuMoXHJKJ3e5x6xytnwwi2VJ0zzfcRRgOnY2FnWmCLfz4hifa1fkoMw0xCv4glCe8MZkoMqsUxsaY2N8LA1avOeaQk=@rjt.dev> <32ead709-88d3-4a96-b224-bc29aee3ae86@gutov.dev> Mime-Version: 1.0 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="40071"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , 69625@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 16 02:39:46 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 1rlJ1V-000AFp-81 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Mar 2024 02:39:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlJ1D-0007Y8-Kh; Fri, 15 Mar 2024 21:39:27 -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 1rlJ1C-0007Y0-3P for bug-gnu-emacs@gnu.org; Fri, 15 Mar 2024 21:39:26 -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 1rlJ1B-0005UR-RH for bug-gnu-emacs@gnu.org; Fri, 15 Mar 2024 21:39:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rlJ1m-0007gt-Au for bug-gnu-emacs@gnu.org; Fri, 15 Mar 2024 21:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Randy Taylor Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Mar 2024 01:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69625 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 69625-submit@debbugs.gnu.org id=B69625.171055314329487 (code B ref 69625); Sat, 16 Mar 2024 01:40:02 +0000 Original-Received: (at 69625) by debbugs.gnu.org; 16 Mar 2024 01:39:03 +0000 Original-Received: from localhost ([127.0.0.1]:54549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlJ0k-0007fC-MK for submit@debbugs.gnu.org; Fri, 15 Mar 2024 21:39:02 -0400 Original-Received: from mail-4323.proton.ch ([185.70.43.23]:27769) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlJ0W-0007ek-4d for 69625@debbugs.gnu.org; Fri, 15 Mar 2024 21:38:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail2; t=1710553079; x=1710812279; bh=YT4TrB0igK2oJGFwqyKcbAtgCCcokPKSxptxxOYB8B4=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=Iz5hEZw9tIYKLF5vYvYXOPxsiaegTXcpuhjEX75GC6u3uWyvsT/MGgzaqWQ5qorXV pYwgH4UBRWZuBc8Jx+sICtJ9S20P/bybpF3znN5F85IRshUQjU/Ex88jYzP3Uvx0jY JLZOhodB8Q7Otfg8fvX/JkTg/Kde59JiKJFu6SL2nlg98qBoqy3Uvi75FbSBVXCVnn viYkqnfsyTN9x6IYpU2Cd3iDgq303pyTiaDDGC89NutVjF4Z1CKFiqOtorbrk1VX2b fkbuflb/AGLN7bJmzqMqqO7Hlv6MIrVVryOSB/dPL+dX7jHrq7g+e17MaQNqI0Ftmk 56GdyQeVQv1yQ== In-Reply-To: <32ead709-88d3-4a96-b224-bc29aee3ae86@gutov.dev> Feedback-ID: 44397038:user:proton 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:281701 Archived-At: On Thursday, March 14th, 2024 at 21:52, Dmitry Gutov wro= te: >=20 >=20 > On 09/03/2024 05:50, Randy Taylor wrote: >=20 > > VariantA gets highlighted as a type and not a function at level 3 becau= se that > > level doesn't support functions, but does support types. Maybe that cou= ld be > > considered a bug in that it shouldn't be highlighted at all for level 3= ? >=20 >=20 > Probably. >=20 > > I'm not sure how worth it would be to do something about that though, o= r how > > easy. >=20 >=20 > Same. I haven't looked into it. >=20 > > For VariantC, our (and tree-sitter's) best guess is that it's a variabl= e. > > We can't really know it's a type without guessing - like assuming a cap= italized > > identifier is a type, and I don't think that's something we can assume.= People > > can have capitalized functions and variables even if that goes against = Rust's > > usual style. Perhaps as a compromise we could introduce a variable (or = something) > > that lets the user specify that all capitalized identifiers should be t= reated as > > types? Maybe it even makes sense to default it to that behaviour since = I believe > > most Rust code follows that style. >=20 >=20 > We do have some rules already that are based off whether an identifier > is capitalized. I.e. some for use_as_clause, and another for > highlighting an identifier with font-lock-constant-face if it's > ALL_CAPS. So it might be logical to carry on with that approach. >=20 > If the style is consistent enough across the ecosystem, of course. >=20 Indeed, but those rules (minus the ALL_CAPS one) don't apply to all identifiers but rather specific kinds (most if not all applying to use declarations). > We could add a variable too, but that'd make the rules more complex so > it would be helpful to understand first whether there are users who > would benefit. Agreed. This is the first I've heard it mentioned.