Some Usability Suggestions for Clojure Editors

Especially for newbies it can be rather daunting to read Clojure code. These are some suggestions that I feel would go a long way to helping me personally.

Key/value highlighting

{:a :b :c {:d :e} :f :g}

is a lot harder to read correctly than in other languages. The editor could show the commas even though they're not actually there in the file (credit goes to lgstein for this improvement to my original idea of underlining).

Highlight macros

One thing I find really confusing with Clojure is that foo can mean pretty much anything depending on context because of the macro dynamic. It'd be nice to at least get some warning when reading code about what are macros and what are not. Syntax highlighting could mark macros in a different color.

Highlight symbols that are eaten by macros

This one requires a bit more intimate knowledge of the code but it'd be nice to see directly when reading (foo bar) (baz blah) that foo and baz are macros (as per above) and that bar is NOT resolved in the current scope because the macro fiddles with it in some way, but baz IS resolved in the current scope. Again, syntax highlighting with a different color would be useful.

Progressive macro expansion GUI

I'd like to be able to see each step of the macro expansion in discrete steps. It'd be nice to see first how many expansions will occur, and then being able to use for example a slider to go from what the editor currently shows (0 steps) to the full expansion and scrub back and forth to see what I screwed up.

- boxed