Subject: Re: bug#60105: [PATCH] Add yaml-ts-mode

From: Juri Linkov <[email-masked]>
Date: Tue, 03 Jan 2023 20:21:49 +0200

>> 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.