Fork me on GitHub
#cider
<
2021-01-17
>
solf03:01:43

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: http://ergoemacs.org/emacs/elisp_syntax_coloring.html

solf05:01:44

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

bozhidar11:01:46

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

bozhidar11:01:16

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

bozhidar11:01:21

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

yiorgos11:01:19

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

yiorgos11:01:07

how can I jump to the Java code?

bozhidar11:01:02

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

yiorgos12:01:35

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

vemv01:01:46

I created a high-quality plugin addressing this problem. I still need some feedback before announcing it elsewhere: https://github.com/clojure-emacs/cider-nrepl/issues/64#issuecomment-752921557 If you can give it a spin I'd appreciate it much!

yiorgos20:01:51

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

vemv20:01:46

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

👍 1