You can find the project at https://github.com/brehaut/inc-clojure-brush.
It's running on my blog, frinstance http://brehaut.net/blog/2011/ring_introduction
and http://brehaut.net/blog/2011/l_systems
Key features:
* The head of every list is handled as either a function or method
call. No need for a list of clojure.core tokens.
* Comments, (comment …), and #_ all supported.
* Local variables in common core forms are highlighted.
* Meta data and quoted forms have additional styling.
Very nice! I see it highlights mismatched parentheses too:
(use '[net.cgrand.moustache :only [app delegate]]))
Double parentheses - the last one is highlighted red.
I'll have to figure out how to integrate it into the blogging software
I'm using...
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)
Looks nice. I think I may just deprecate my project in favour of this
one, especially since I don't really have the time to update it these
days.
One idea that just occurred to me is that there may be a chance to
leverage ClojureScript for this. I am not a ClojureScript (or
Javascript) expert, but it seems to me that using the ClojureScript
reader could help.
Nice work.
Daniel Solano Gómez
I've wondered about that too; I chose to write it in javascript
because i know it fairly well and knew i could get it running fast.
However, the design I chose (which collects tokens into the s-exp
tree, i.e. so that comment forms can have their parens highlighted)
would mean that even with Clojurescript, I wouldn't be able to
leverage the reader. There might also be ordering problems with maps
and sets using the reader?
Andrew Brehaut