Fork me on GitHub

I've noticed that the Cursive test diff viewer does not let me use paredit to navigate, edit, select, etc. I thought it used to do that, but I could easily be misremembering. Regardless, it'd be great to get paredit support in the test diff viewer.


Hmm, interesting, thanks - I’ll check that.


I’ve fixed that for the next build.

❤️ 2

does IntelliJ index directories like .idea and .cpcache by default and is it best to mark them as excluded in project settings > modules ?


Yes, they should be excluded. I assume that IntelliJ marks .idea as excluded by default, Cursive should do the same for .cpcache.


but when I start a new project or import one, .idea and .cpcache are grey not red, which I assume means they're going to be indexed. It doesn't make sense for IntelliJ to index its own metadata but then IntellIj is very keen on indexing everything it can so it wouldn't surprize me in the least if it did

R.A. Porter11:11:55

I'm trying to load-file with an eval in my ~/.clojure/deps.edn so I can have a repo of common fns I use. I have this alias that is including in the aliases run with my project...

:my/dev {:extra-deps {djblue/portal {:mvn/version "RELEASE"}}
         :main-opts ["-e" "(load-file,(str,(System/getProperty,\"user.home\"),\"/.clojure/dev.clj\"))"]}
and when I take a look at the REPL process, I can see the eval at the end:
clojure.main -i /private/var/folders/t6/1fg1jgsj64qfwwq081d8f6498r5sw6/T/form-init15371867233491097436.clj -e (load-file,(str,(System/getProperty,"user.home"),"/.clojure/dev.clj"))
but the namespace isn't loading into my REPL. I've tried other evals - basic assignment, prns, etc. - to see if those work and none of them seem to be either.


I think another option is to have a project directory which would make a namespace available on the classpath, then require could find the file for you:

  {:main-opts ["-e" "(require 'dev)" "-r"]
   {my/dev {:local/root "/Users/<user>/repos/dev"}}}


What I did notice is without the "-r" the repl process dies so I wonder if that is the underlying issue you are running into?


I wonder if you could/should add the ~/.clojure directory as a local/root thinking-face

R.A. Porter17:11:50

It's picking up my ~/.clojure/deps.edn okay. And I was able to add an extra-path to a subdir of ~/.clojure and put a user ns in there (as long as I didn't have one in my project to override). It seems to be something specific to eval. I'll try your suggestion above, but if eval doesn't work at all, I don't think that'll be any better.


Is the main mechanism for starting your repl clojure.main?

R.A. Porter17:11:17

Yeah. Through whatever hoops Cursive jumps.

R.A. Porter17:11:58

It's the eval. I've tried your suggestion with a project root and also just as an extra-path and once I get to the repl, I can require in the ns. I just can't get it to run with the eval flag to clojure.main. ¯\(ツ)

👍 1
R.A. Porter17:11:46

I can at least get myself 80% of the way there for now. That's something.


Does this work with a bare Clojure REPL on the command line? i.e. is this a problem with Cursive’s REPL or a more general one?

R.A. Porter23:11:50

Run at the command line with clj -M:dev:my/dev Where the :dev alias is in my local deps and the :my/dev alias is defined in ~/.clojure/deps.edn as

:my/dev {:extra-deps {djblue/portal {:mvn/version "RELEASE"}}
           :main-opts ["-e" "(load-file,(str,(System/getProperty,\"user.home\"),\"/.clojure/dev/dev.clj\"))" "-r"]}
And where that dev.clj being loaded lives where it's specified, it loads correctly and the fns in the namespace are available.

R.A. Porter23:11:03

And one last with the command clj -M:dev -e "(load-file,(str,(System/getProperty,\"user.home\"),\"/.clojure/dev/dev.clj\"))" -r The file also correctly loads and the fns in the namespace are available.


Thanks, I’ll try to repro this.

Colin P. Hill14:11:12

The Clojure code style settings include a "Docstring fill width" field, but when I format a file, it doesn't seem to reformat my docstrings to wrap at that width. Is this a bug, or am I misunderstanding something?


Docstrings aren’t filled as part of the reformatting, there’s an explicit “Fill Paragraph” action that uses it.

Colin P. Hill13:11:32

Ah I see – for some reason I thought it would be a context action (I think Goland had it as one by default, maybe that's what set my expectation), but I see it in the action list. Thanks!


It’s probably a good idea to add a context action for that, actually - could you file an issue for that, please?


I recently dropped some coffee onto my old Macbook and now I have a new Apple silicon replacement. Just installed Intellij+Cursive but I am getting a whole bunch of "Cannot execute: Clojure command not configured" errors. For the record, Clojure is installed and works fine in Terminal.


Right, I think you’ll have to reconfigure deps as described in that section for Cursive to pick it up.

🙏 1

Periodically dropping coffee on your laptop sounds like a good plan!

😁 2

@U0567Q30W Yeah, insurance covered it all, so other than having to wait for Apple to deliver it's been a pretty nice experience.


It's a deps.edn project I've opened in Cursive (from existing sources).


the Clojure CLI was installed via homebrew.