atom / language-clojure

Clojure package for Atom
Other
49 stars 48 forks source link

discussion: emacs clojure-mode differences #36

Open martinklepsch opened 8 years ago

martinklepsch commented 8 years ago

Hey. I've been using Emacs for a while and I really like how it highlights things most notably:

I'm just dipping my toes in Atom but I'm liking it so far. Now I wonder if these changes would be something you're interested in and if so if you have any pointers how to achieve them :)

I can probably figure out the grammar bits but how do I know what ends up being colored in what way?

martinklepsch commented 8 years ago

macros and special forms are colored consistently (i.e. fn, def(n), ns, case, cond, if-let ...)

This could be achieved quite easily by changing this line to keyword.control.clojure.

most functions are not colored in any special way

I guess that's more a matter of the theme that's being used.

The namespace section of symbols is colored

This is possible for forms like (= ns/var 1) but not for function calls as (ns/var 1). In head position the symbol is not treated specially and is just registered as entity.name.function.clojure.


I guess the solution to all of these points will be a mixture of extending themes and adjusting the grammer for more explicit namespaced-var parsing.