GithubHelp home page GithubHelp logo

kuanyui / yajade-mode.el Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 0.0 693 KB

Yet another Emacs major-mode for Jade / Pug

License: MIT License

Emacs Lisp 81.67% HTML 18.33%
jade-templates pug-template-engine emacs

yajade-mode.el's Introduction

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)

yajade-mode.el's People

Contributors

abutcher avatar brianc avatar jkpl avatar kuanyui avatar mc-escherichia avatar ntotani avatar purcell avatar robbyoconnor avatar shanderlam avatar sterlingg avatar thomas-riccardi avatar zonuexe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

yajade-mode.el's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.