This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-18
Channels
- # adventofcode (326)
- # aws (1)
- # beginners (67)
- # cider (52)
- # cljs-dev (5)
- # cljsrn (5)
- # clojure (104)
- # clojure-art (2)
- # clojure-austin (34)
- # clojure-france (12)
- # clojure-greece (38)
- # clojure-india (2)
- # clojure-italy (6)
- # clojure-spec (11)
- # clojure-uk (32)
- # clojurescript (51)
- # core-async (5)
- # cursive (11)
- # data-science (5)
- # datascript (3)
- # datomic (3)
- # defnpodcast (7)
- # fulcro (26)
- # graphql (10)
- # hoplon (1)
- # instaparse (2)
- # jobs (1)
- # klipse (3)
- # lumo (13)
- # off-topic (50)
- # om (2)
- # onyx (19)
- # parinfer (1)
- # pedestal (4)
- # re-frame (18)
- # ring-swagger (1)
- # spacemacs (1)
- # specter (42)
- # sql (9)
- # uncomplicate (18)
- # unrepl (13)
I use :repl-options :init
in my ~/.lein/profiles.clj
like so:
{:user
{:repl-options
{:init (do (set! *print-length* 500)
(set! *print-level* 10))}}}
When i run cider-jack-in
from spacemacs, its seems to be reading a different file then my .lein/profiles.clj. Any idea how i can figure out what the location of the file is?
hmm. What i’m seeing is when i run cider-jack-in. There is a some string output at the bottom of the screen that has what looks like information from a profiles.clj. Only it doesn’t have the same versions as are in my ~/.lein/profiles.clj. I haven’t had to look into this before so i have been happy ignorant.
This version in my ~/.lein/profiles.clj is [cider/cider-nrepl “0.16.0-SNAPSHOT”]. That one is 0.15. Whats troubling me is more that i can’t jack-in at all. When I try, i’m meet with a long wait an exception about like this:
java.lang.RuntimeException: Unable to resolve var: cider.nrepl.middleware.test/wrap-test in this context
I poked around and this problem seems to be resolved on later versions or cider.if you are using cider-jack-in
, it manages its own dependencies so you don't need to specify one. have you updated cider in emacs? it always brings in the version of cider-nrepl that matches itself
i’m on Cider 0.15snapshot and emacs 24.5 on spacemacs release 0.200.9 . Not sure thats relevant. I don’t recall manually messing with cider. I’m only having this issue on my mac, my desktop works fine. I recall trying to do a clean install of spacemacs, which i assume includes Cider and it not resolving the issue (repl not connecting, the above error message). To make things more confusing (to me) the error only appears in certain clojure projects.
im going to figure out how to get the message buffer, as that might help.
in my profiles.clj?
Because i mis-read these instructions http://spacemacs.org/layers/+lang/clojure/README.html
as far as I'm aware, you don't need to specify either cider-nrepl or refactor-nrepl anywhere. cider will take care of them
if you are using cider-jack-in
. if you are using cider-connect
, then it is just connecting to an existing repl and you have to make sure the middle ware are there yourself. does that make sense?
recent versions should be 0.16-snapshot which will get the cider-nrepl version automatically
here's a ticket about what I think is happening to you https://github.com/clojure-emacs/cider/issues/2081
Yes. Though i need a better mental model for the REPL at some point. In your past message you said that if i upgrade cider then it should correct the problem (a symtom of which is the NullPointer Exception).
when you say cider-jack-in
, cider will crank up lein and make sure the right nrepl middlleware are present
and 0.15 nrepl has a bug in it so if you get a newer cider it will ask for a newer cider nrepl
And the symptom you are seeing is it not knowing what a function is (wrap-test) because that code has invalid syntax in clojure 1.9
I updated everything and i’m connected. 🙂
Well, i’m fairly sure i got myself into that mix. There was an issue with my emacs config so it wasn’t updating. Actually, what confused me the most was that when i went to update emacs i thought it was saying i was already on the latest version.
Is there a way to have different highlighting of function and macros names?
based on `cider-mode.el line 597:
,@(when macros
`((,(concat (rx (or "(" "#'")) ; Can't take the value of macros.
"\\(" (regexp-opt macros 'symbols) "\\)")
1 (cider--unless-local-match font-lock-keyword-face))))
,@(when functions
`((,(regexp-opt functions 'symbols) 0
(cider--unless-local-match font-lock-function-name-face))))
it looks like macros get font-lock-keyword-face
and functions get font-lock-variable-name-face
. so there are two different ones for them
and these can be modified in the source they are defined in or in M-x customize-group
faces
, custom faces
Thank you, @dpsutton!