Fork me on GitHub

I'd like to change the color of css classes in hiccup, in both "versions" (when used as [:div.classname and [div {:class "classname"}, such as in the joint screenshot. (to another color than the default keyword/string color) I've never touched highlight syntax on emacs, what would be the best approach? Should I just follow any font-lock generic guide or is there something specific about clojure-mode/cider highlighting that I need to take into account? For now I'm thinking of creating a minor-mode and follow this guide:


Seems to be harder than expected, I can't just easily add regexes to fontify non-keywords strings, seems like I need to much around with the syntax table


Yeah, it's definitely not trivial, because you also have to be careful about the order in which the different fontification rules get applied.


I don't think you need to touch the syntax table, though.


This should give you a good idea how the font-locking works today.


Is there a key combo to see the implementation of java code? for example (iterate inc 1) if I do M-. on iterate it will show me the implementation of iterate which internally calls clojure.lang.Iterate/create


how can I jump to the Java code?


Same keybinding, provided the JDK source is on your classpath.


> provided the JDK source is on your classpath. I think that might be the issue, is always asking for Symbol: in the minibuffer


I created a high-quality plugin addressing this problem. I still need some feedback before announcing it elsewhere: If you can give it a spin I'd appreciate it much!


It seems that this is a Lein plugin but I am using tools.deps 🙂


I will adapt it at some point. Luckily I didn't hardcode things against Lein assumptions

👍 3