Fork me on GitHub

I am trying to get a clojurescript environment set up on a macos machine. Cursive seems not to be working with the latest IDEA: every Clojure keyword in a source file shows up as cannot be resolved . I was able to get a remote Cursive REPL to work with shadow-cljs. The REPL works fine, just the editing is off. Any suggestions? Thanks!


I will take a look. Thanks!


Great! That helped fix the issue.


Hi, apologies for the stupid question but I’m new to Cursive and Clojure. I have found the shortcut to load the top-level form in the REPL from the Cursive cheat sheet, but I can’t find anything to load any inner form on its own, or to load only the form the cursor is in. Is this because the inner form depends from the environment of the top-level one? Thanks


Nope. You can send any form to REPL.


In IntelliJ -> Settings -> Keymap -> Send Form Before Caret to REPL.

🙌 3

Every clojurian has a hot key for that functionality.


I can imagine, thanks very much @U76D9RZRR


I’m trying to get things right with my configuration


I don’t know why the Wrap with ( shortcut stopped working on my Mac, it must have been an update because it used to work.


No problem. 🙂 There are no "stupid questions". Just ask here or in #beginners channel if you have any questions - people here at Clojurians slack are very helpful and friendly.

👍 3

I don't quite get what you are meaning by Wrap with ( ...


I guess you are using paredit or parinfer. I guess parinfer is easier for a newcomer. •


... if you are not using paredit or parinfer you definitely should start using either of them.


If you are using IntelliJ IDEA / Cursive, see the window lower right corner -> Structural style.


yep sorry, I meant the shortcut for Intellij that comes with Structural editing


Ah, I get it now. 🙂 There really is a command Wrap with ()


... never used it myself.


yep, command+shift+9 used to work wrapping the for with additional parens, but at some point is stopped working. Usually, this happens when there’s a conflict with another macbook shortcut.


thanks for the links to paredit and parinfer 👍


Thanks for introducing me this new functionality Wrap with - I need to assign it some nice hotkey. 🙂

👍 3

Experimenting with it... so it wraps the next form with parens the cursor is...


... do I need it? Not sure. I usually just add () and then slurp forward... (using paredit)


When you want to have a coffee break you might enjoy reading "Metosin's Favorite Editors" - relates a bit to what you are doing right now. 🙂


thanks! 🙂


@UF8BN5KJS Try rebinding that action. A few people have mentioned that in recent IntelliJ versions the keybinding actually needs to be Cmd-Shift-( rather than Cmd-Shift-9. I didn’t experience that myself, so I’d be interested to know if that fixes it for you.


@U0567Q30W omg this has actually fixed it!


thank you so much


what’s the best way to document this misbehaviour?


So, I’m not sure. I think what I probably need to do is to change how the actions are bound in the plugin, but I need to check that. I’ll ask in the JetBrains forum.


@UF8BN5KJS Which OS are you on? I just double checked, and my action is bound to Cmd-Shift-9. Since you’re talking about command, are you on macos?


@U0567Q30W yes Catalina 10.15.7


(apologies for the late reply)


In certain repos I get a long listing of @#Cursive#TestSupport#@ ... when Run Testst in Current NS in REPL . Is there some configuration causing this? (IntelliJ Ultimate 2020.3.2 & Cursive 1.10.1-eap2-2020.3)


Aah, I think I found it in Google. This is a cljc file and I found some old reply in the clojurians slack google cache:

Unfortunately, the Cursive test integration currently only works with Clojure, not CLJS.


I think that should work with the CLJC tests run from Clojure, but not from CLJS, right. Another thing that can cause that is if you’re using a test runner which runs tests in background threads.


Got some problems in Idea 2020.3 & Cursive (stable or EAP) and latest clojure/tools/[email protected] Symptoms: can't see any modules in Clojure Deps tab in Idea. Also can't start remote repl. Downgrading to clojure/tools/[email protected] solves the problem.


I’ll take a look at that, thanks.

Alex Miller (Clojure team)21:02:27

It is possible that the cache file format change is not properly picked up in the cursive scenario - rm ing your .cpcache dir would help if that’s the case, but just guessing

Alex Miller (Clojure team)21:02:45

Would only matter if using main or JVM opts


I don’t directly use the cpcache, I just hit the t.d.a API.

Alex Miller (Clojure team)21:02:44

Unless you’re calling the scripts nses

Alex Miller (Clojure team)21:02:11

The first 3 items there are mostly in the bash stuff and the last one is just printing warnings, so not sure what it would be


Ok, I’ll take a look next week, if I figure it out I’ll let you know.


I’ve reproduced this, it’s definitely something that has changed in the latest t.d.a, I’ll investigate it tomorrow and hopefully get a fix out:


Selecting an earlier version, either on the command line or explicitly in Cursive using the “Use tools.deps directly” option should be a workaround.

Alex Miller (Clojure team)05:02:58

Well please let me know what it was as I'm surprised behavior has changed