[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should yaml-ts-mode inherit from prog-mode?
From: |
Rudolf Schlatte |
Subject: |
Re: Should yaml-ts-mode inherit from prog-mode? |
Date: |
Sun, 12 Mar 2023 13:31:48 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin) |
Daniel Fleischer <danflscr@gmail.com> writes:
> Ongaro [2023-03-11 Sat 18:14] wrote:
>
>> 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.
>
> Please point out where in the YAML spec "yes" is used as a boolean. And
> again, usefulness of highlighting different objects does not mean it's a
> programming language.
This is the "Norway Problem". A YAML block like this:
geoblock_regions:
- dk
- fi
- is
- no
- se
evaluates to the equivalent JSON:
{"geoblock_regions": ["dk", "fi", "is", false, "se"]}
Example taken from this page, which has many more examples where
semantic highlighting of YAML would avoid a LOT of footguns:
https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-from-hell
- Re: Should yaml-ts-mode inherit from prog-mode?, (continued)
- Re: Should yaml-ts-mode inherit from prog-mode?, Eli Zaretskii, 2023/03/21
- Re: Should yaml-ts-mode inherit from prog-mode?, Rudolf Schlatte, 2023/03/21
- Re: Should yaml-ts-mode inherit from prog-mode?, Yuri Khan, 2023/03/21
- Re: Should yaml-ts-mode inherit from prog-mode?, Rudolf Schlatte, 2023/03/21
- Re: Should yaml-ts-mode inherit from prog-mode?, Yuri Khan, 2023/03/22
- Re: Should yaml-ts-mode inherit from prog-mode?, David Ongaro, 2023/03/21
- Re: Should yaml-ts-mode inherit from prog-mode?, Randy Taylor, 2023/03/20
Re: Re: Should yaml-ts-mode inherit from prog-mode?, Pedro Andres Aranda Gutierrez, 2023/03/05
Re: Should yaml-ts-mode inherit from prog-mode?, Ongaro, 2023/03/11
Re: Re: Should yaml-ts-mode inherit from prog-mode?, Pedro Andres Aranda Gutierrez, 2023/03/21