Skip to content

kuanyui/yajade-mode.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yajade-mode

yajade-mode is yet another major-mode for Jade / Pug template language.

Compare to pug-mode & jade-mode

  • Better (or less-mistakes) syntax-highlights than pug-mode and jade-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-mode to achive this)
  • Compatible with mmm-mode

Screenshot

screenshot.png

Known Bugs

  • 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-attr function, 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 as buffered code.
  • Multi-line string block is not handled.
  • I found yajade--font-lock-remove-highlights-in-plain will still broke mmm-mode (see Search-based Fontification in font-lock official doc) so I finally comment it out… (alas)

About

Yet another Emacs major-mode for Jade / Pug

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published