Open calebreister opened 5 years ago
That's not terribly surprising because to solve this properly you need something more powerful than regular expressions, you need code that actually parses YAML and detects the beginning, items and end of a list, with the items possibly being nested further. I don't expect such a change to happen any time soon.
@wasamasa I was kind of beginning to get that idea. After looking at YAML in more detail, I came to realize just how ridiculously complicated it can be. Perhaps it would be possible to port an existing parser to ELisp?
What everyone does in practice is using libyaml
directly. You don't want to port that kind of thing, other than for educational purposes. An Emacs module binding to it might be interesting to build a better major mode upon, much like js2-mode
or enh-ruby-mode
.
Maybe this project would be useful for this effort?: https://github.com/syohex/emacs-libyaml
@syohex, @yoshiki is looking to recruit maintainers and collaborators for yaml-mode. Out of curiosity, might you be interested in working on it, and possibly integrating support for your emacs-libyaml?
Regards, Nicholas
I've discovered an highlighting error when dealing with inline lists (see image). I've narrowed down the issue to the yaml-nested-sequence-re regex, but have not found a way to fix the problem.