GNU bug report logs - #60105
[PATCH] Add yaml-ts-mode

Previous Next

Package: emacs;

Reported by: Randy Taylor <dev <at> rjt.dev>

Date: Thu, 15 Dec 2022 22:21:01 UTC

Severity: normal

Tags: patch

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 60105 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Randy Taylor <dev <at> rjt.dev>
Cc: casouri <at> gmail.com, 60105 <at> debbugs.gnu.org
Subject: Re: bug#60105: [PATCH] Add yaml-ts-mode
Date: Mon, 02 Jan 2023 20:52:19 +0200
> +   :language 'yaml
> +   :feature 'string
> +   :override t
> +   '([(block_scalar)
> +      (double_quote_scalar)
> +      (single_quote_scalar)
> +      (string_scalar)] @font-lock-string-face)

Thanks, yaml-ts-mode works great.  One problem is that
with the above setting everything is (over)fontified in the buffer.
This is the only mode I have seen where 100% of text has
non-default colors making it so called "angry fruit salad".
In this regard yaml-mode is not better: it fontifies only text in quotes
that makes an unnecessary distinction between quoted and unquoted text.
I know it's possible to configure this in a hackish way:

  (with-eval-after-load 'yaml-ts-mode
    (setq yaml-ts-mode--font-lock-settings
          (seq-remove (lambda (e) (eq (nth 2 e) 'string))
                      yaml-ts-mode--font-lock-settings)))

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.




This bug report was last modified 2 years and 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.