This project is an attempt to create a new JavaScript editing mode for Emacs.
Jove includes a striped down port of the Acorn parser in order to provide complex highlighting and indentation functionality.
- parse-js written in Common Lisp by Marijn Haverbeke
- CodeMirror
- Acorn
- UglifyJS
- js2-mode
- Implementing a Syntax-Highlighting JavaScript Editor—In JavaScript By Marijn Haverbeke
- Acorn: yet another JavaScript parser By Marijn Haverbeke
- How to implement a programming language in JavaScript By Mihai Bazon
Jove is still a work in progress. Though if you want to check it out,
clone this repository, add it to your load-path
and then require it.
Optionally if you think its pretty cool, add it as the default mode for
JavaScript.
(add-to-list 'load-path (expand-file-name "elisps/jove"
user-emacs-directory))
(require 'jove)
(add-to-list 'auto-mode-alist '("\\.js$" . jove-mode))
Shear madness.
After getting frustrated in an attempt to modify the indentation code
of js.el
, I concluded a simple* syntax parser would provide a more
complete understanding of the code for editing purposes. Plus I needed
something to do in my spare time.
* ha, ha, ha…
The functions of the lexer are complete and tested. The parser functions are mostly complete and untested. I have been performing informal tests of the parser with Underscore and JQuery, it seems to be parsing everything correctly.
- JSX indentation is currently non-functional. The biggest hurdle is combining the legacy indentation code from js-align and newer AST funcationality. The end goal is to base all indentation off the AST, meanwhile I want a solution that can use either method.
- Auto-pairing of JSX tags.
- Highlighting of JSX tag pairs.