Hi, I just started using spacemacs and was wondering if anyone here might be able to answer my question. In cljc
files only the clj
parts are highlighted, cljs
parts are greyed out. I’d like for them both to be highlighted at once. I can do that by setting the major mode to clojurescript, but was wondering if there’s a way to “turn on” highlighting for both targets in cljc
files. Anyone familiar with clojurec mode have any insight?
The only thing I found in the docs refers to the REPL, but maybe having a ClojureScript repl running would highlight both (just a guess) https://docs.cider.mx/cider/0.25/cljs/up_and_running.html#working-with-cljc-files
I was wondering, that too. I tried keeping a cljs repl running, but doesn’t seem to do what I want.
And hi, by the way! Thanks for the great tutorials on spacemacs! Helped a lot with getting started.
Hello and thanks. There are some options on the dynamic syntax highlighting page. I wonder if its specific things that are not highlighted, rather than all cljs code... https://docs.cider.mx/cider/0.25/config/syntax_highlighting.html Also the #cider channel has several maintainers of CIDER so they should know in general, assuming no answers are forthcoming in this channel.
ah ok great, thanks. I wasn’t sure if it was an issue with my specfic config since I’m using spacemacs or something with cider generally.
Its not always obvious where the cause may be. If you can share the code I can give it a try in my Spacemacs setup.
Ah that last link you sent is brilliant, it was this:
(setq cider-font-lock-reader-conditionals nil)
makes perfect sense once you know where to look! Thanks so much 🙏
Ah yes, I just found this issue with the same question, very useful to know. https://github.com/clojure-emacs/clojure-mode/issues/456#issuecomment-339931350
ah great. yeah.. exact same question! Your google fu is better than mine. Thanks so much for the help! really appreciate it 🙂
I wonder if starting the cljs repl didn’t work because of something else weird in my config.. I just connected to a shadow-cljs nrepl I always keep running.
seems many people find a few challenges using Cider and shadow-cljs together, there seems to be quite a few configs to set.
hm seems possibly related, then. Anyway not a big deal, maybe will investigate later. For now having the syntax highlighting working is great.