yoshiki / yaml-mode

The emacs major mode for editing files in the YAML data serialization format.
GNU General Public License v3.0
482 stars 132 forks source link

Lacks JSON Support #69

Closed grahamc closed 4 years ago

grahamc commented 5 years ago

As of YAML 1.2, YAML is an official super of JSON (https://yaml.org/spec/1.2/spec.html), however yaml-mode formats JSON like:

{
"language": "nix",
"nix": "2.1",
"matrix": {
  "include": [
  {
  "name": "cargo pedantry",
  "script": "nix-shell --run checkPhase --arg useNix1 false -A mozilla-rust-overlay"
  },
  {
  "name": "checkPhase",
  "script": "nix-shell --run checkPhase --arg useNix1 false"
  }
  ]
  }
}
wasamasa commented 4 years ago

Sorry, but no. Just because it can be done, I won't add the whole indentation/highlighting machinery of an existing JSON/JS mode to this package. Use a JSON mode instead.