-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Derive from prog-mode rather than text-mode #52
Comments
I consider YAML to be of the same class as HTML and XML, structured, mostly readable and with a fair amount of syntax. Considering that they derive from text-mode, not doing so for YAML requires extraordinary reasons. I'm only aware of Generally speaking, I find |
Scanning MELPA and modes I use regularly:
Do you really think YAML looks more like reST and HTML than it does JSON, HAML, or QML?
This line is fuzzy, but I think YAML is so far on the
There is no mode more specific than I won't argue further, but I think this is a decision that causes a lot of annoyances, and I can't see any gain. |
It's somewhere between reST and JSON, although
These days I'm mostly using it for localization files |
I think deriving from YAML is a data serialization language, much like JSON, INI, HAML, and QML which all derive from HTML, RST, and Markdown are all markup languages that derive from YAML doesn't mark up text. While YAML can used to write prose, its primary function is serialization. If its going to stay derived from |
I don't plan on changing that this late after making the decision, with several releases in. I don't think it's as big of an issue as you make it to be either. If you find a solution, feel free to post it in here. |
I'm experiencing the same trouble. Since the last comment (from the last maintainer I assume?) states
and PR #85 was rejected, possible workarounds (with their own disadvantages) I currently see are:
|
There is a much easier workaround: Just add whatever you have in prog-mode-hook that's acceptable to have for YAML files to yaml-mode-hook. |
Yes, I agree it'd be nice to utilize [I believe OP described enough quantity of exact issues, I've got quite the same ones: customization I'd expect to be applied to a natural language text only are applied to an artificial language text with So, for such cases, I assume the correct workarounds (probably not all possible) were listed in my previous comment. |
As a user-level workaround, something similar to this should also in principle work.
It doesn't quite work at it is (or, to be precise, it only works once), just leaving it here in case it's useful to someone else. |
yaml-mode
's derivation fromtext-mode
causes my configuration to require more special-case hooks (and "unhooks") foryaml-mode
than any other mode.reST, HTML, Markdown, etc. (used to justify this derivation in #27) are markup languages. A document is primarily text intended for direct reading, surrounded by formal markup. YAML is, as it states, not. It's a language specifying structure, sometimes containing human-readable text (but often not).
I don't want to spellcheck anything but comments. I don't want to electrify any quotes or typographic punctuation. I want flycheck to complain loudly about syntax errors. In every respect, I want to act like a prog-mode.
The text was updated successfully, but these errors were encountered: