From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#60105: [PATCH] Add yaml-ts-mode Date: Tue, 03 Jan 2023 20:21:49 +0200 Organization: LINKOV.NET Message-ID: <86k023v5qa.fsf@mail.linkov.net> References: <864jt8vjyc.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35052"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: casouri@gmail.com, 60105@debbugs.gnu.org To: Randy Taylor Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 03 19:24:18 2023 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 1pClxR-0008xZ-RM for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 Jan 2023 19:24:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pClwJ-0000CF-Ki; Tue, 03 Jan 2023 13:23:07 -0500 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 1pClwI-0000Af-81 for bug-gnu-emacs@gnu.org; Tue, 03 Jan 2023 13:23:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pClwE-0006Gx-JU for bug-gnu-emacs@gnu.org; Tue, 03 Jan 2023 13:23:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pClwE-0005NG-5E for bug-gnu-emacs@gnu.org; Tue, 03 Jan 2023 13:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Jan 2023 18:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60105 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 60105-submit@debbugs.gnu.org id=B60105.167277016620623 (code B ref 60105); Tue, 03 Jan 2023 18:23:02 +0000 Original-Received: (at 60105) by debbugs.gnu.org; 3 Jan 2023 18:22:46 +0000 Original-Received: from localhost ([127.0.0.1]:46692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pClvy-0005MY-G0 for submit@debbugs.gnu.org; Tue, 03 Jan 2023 13:22:46 -0500 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:57071) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pClvu-0005MI-W7 for 60105@debbugs.gnu.org; Tue, 03 Jan 2023 13:22:44 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 41374FF805; Tue, 3 Jan 2023 18:22:32 +0000 (UTC) In-Reply-To: (Randy Taylor's message of "Mon, 02 Jan 2023 21:58:57 +0000") 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:252429 Archived-At: >> But what I propose is to add a customizable option to enable/disable >> font-lock-string-face on most text to lessen the color burden on users. > > I think using treesit-font-lock-recompute-features is the way to > adjust which features you want, and is what is expected for cases like > this (but Yuan would know best). The reason why I proposed a new customizable option is because ruby-ts-mode provides an option ruby-ts-highlight-predefined-constants that enables some rules in ruby-ts--font-lock-settings. But maybe there is no way to avoid this fine-grained setting in ruby-ts-mode. But you are right that (treesit-font-lock-recompute-features '() '(string)) is the right way to customize it. > Alternatively, treesit-font-lock-level dictates which level of > features should be included for highlighting. The default is level 3, > and string is on level 2. We can move string to the 4th level, which > may be an OK compromise? It would be nice if you will decide to move 'string' to the 4th level by default since the 4th level is intended for maximal fontification.