emacs-devel
[Top][All Lists]
Advanced

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

Re: Should yaml-ts-mode inherit from prog-mode?


From: Ongaro
Subject: Re: Should yaml-ts-mode inherit from prog-mode?
Date: Sat, 11 Mar 2023 18:14:15 -0800
User-agent: Gnus/5.13 (Gnus v5.13)

Daniel Fleischer <danflscr@gmail.com> writes:

> I think yaml doesn't look at all like a programming language. There are
> no keywords, only free text.

If something is considered a "programming language" isn't defined by
whether it has keywords. But we can ignore that, since yaml has quite a
few keywords (e.g. see yaml-font-lock-keywords or others which are not
even implemented in the current yaml-mode, like explicit tags
(https://yaml.org/spec/1.2.2/#example-various-explicit-tags)).

> There's no need for parenthesis or oven quotation marks, it's very
> lax.

Also not true. If you happen to use some of the keywords like "yes", you
have to mind to quote it if you actually meant the string "yes" not a
boolean value of true. Of course that is exactly where having a mode
which highlights these keywords helps.

> It looks much more like free text than a structured language.

It has a pretty strict specification, but it's true that some
implementations may be lax.

In any case, I'm not arguing that YAML is a "programming" language. But
it's definitely not free-form text. And if there is no viable
alternative between text-mode and prod-mode than it should be prog-mode.



reply via email to

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