yajade-mode is yet another major-mode for Jade / Pug template language.
- Better (or less-mistakes) syntax-highlights than
pug-modeandjade-mode. (see screenshot) - Much smarter & stable & comphrehensive indentation hehaviors.
- Fix a lot of stupid wrong syntax-table of
pug-mode - No inline JS / CSS highlight (please use
mmm-modeto achive this) - Compatible with mmm-mode
- Emacs’s syntax engine cannot deal with single-line string, it’s inflexible and always match paired quotes across lines (doc: 1, 2), so quote character in plain-text (e.g.
span() foo's bar) will still be wrongly interpretered.
It’s impossible to fix currently unless GNU Emacs improves its syntax APIs, or write a real parser to replace the rules for string quotes in syntax-class-table.
- Buffered code is wrongly highlighted. I’ve ever tried to solve this with
yajade--font-lock-attrfunction, but the behaviors of font-lock are more bizarre than JoJo’s Bizarre Adventure. - Highlight for nested tags (e.g.
a: img) is not handled. Same reason asbuffered code. - Multi-line string block is not handled.
- I found
yajade--font-lock-remove-highlights-in-plainwill still brokemmm-mode(see Search-based Fontification in font-lock official doc) so I finally comment it out... (alas)