Skip to content
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

Incorrect highlighting of inline lists #72

Open
calebreister opened this issue Jul 12, 2019 · 4 comments
Open

Incorrect highlighting of inline lists #72

calebreister opened this issue Jul 12, 2019 · 4 comments

Comments

@calebreister
Copy link

calebreister commented Jul 12, 2019

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.

Screenshot_20190711_174920

@wasamasa
Copy link
Collaborator

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.

@calebreister
Copy link
Author

@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?

@wasamasa
Copy link
Collaborator

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.

@sten0
Copy link

sten0 commented Nov 8, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants