[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should yaml-ts-mode inherit from prog-mode?
From: |
Daniel Fleischer |
Subject: |
Re: Should yaml-ts-mode inherit from prog-mode? |
Date: |
Tue, 28 Feb 2023 19:50:24 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Romanos Skiadas <rom.skiad@gmail.com> writes:
> I was using yaml-ts-mode in Emacs 30, and to my surprise I found it inherits
> from text-mode.
> However, and here is where things kind of break down a bit: I would
> personally argue that YAML has a code feel to it,
> what with all the bash scripts that end up in it. Personally, I feel that
> YAML is more of a prog language than JSON
> (whatever that means), and according to the spec it is a superset of JSON. In
> fact, the JSON mode shipped with Emacs
> inherits from prog-mode!
I think yaml doesn't look at all like a programming language. There are
no keywords, only free text. The bash scripts you mention are defined in
terms of a multi line string but these strings can contain anything, not
just code snippets. There's no need for parenthesis or oven quotation
marks, it's very lax. It looks much more a free text than a structured
language.
--
Daniel Fleischer