bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Juri Linkov
Subject: bug#60105: [PATCH] Add yaml-ts-mode
Date: Mon, 02 Jan 2023 20:52:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]