Fork me on GitHub
#cursive
<
2021-02-20
>
jasmith00:02:45

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!

jasmith21:02:53

I will take a look. Thanks!

jasmith21:02:15

Great! That helped fix the issue.

gibi16:02:49

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

kari17:02:17

Nope. You can send any form to REPL.

kari17:02:21

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

🙌 1
kari17:02:39

Every clojurian has a hot key for that functionality.

gibi17:02:42

I can imagine, thanks very much @U76D9RZRR

gibi17:02:54

I’m trying to get things right with my configuration

gibi17:02:00

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.

kari17:02:09

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.

👍 1
kari17:02:24

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

kari17:02:32

I guess you are using paredit or parinfer. I guess parinfer is easier for a newcomer. • http://danmidwood.com/content/2014/11/21/animated-paredit.htmlhttps://shaunlebron.github.io/parinfer/

kari17:02:14

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

kari17:02:57

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

gibi17:02:11

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

kari17:02:10

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

kari17:02:17

... never used it myself.

gibi17:02:30

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.

gibi17:02:56

thanks for the links to paredit and parinfer 👍

kari17:02:01

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

👍 1
kari17:02:41

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

kari18:02:16

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

kari18:02:50

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. 🙂 https://www.metosin.fi/blog/metosin-favorite-editors/

gibi18:02:02

thanks! 🙂

cfleming20:02:02

@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.

gibi22:02:25

@U0567Q30W omg this has actually fixed it!

gibi22:02:32

thank you so much

gibi22:02:44

what’s the best way to document this misbehaviour?

cfleming22:02:30

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.

cfleming22:02:38

@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?

gibi09:02:27

@U0567Q30W yes Catalina 10.15.7

gibi09:02:38

(apologies for the late reply)

kari17:02:30

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)

kari17:02:52

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.

cfleming20:02:29

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.

mike_ananev20:02:50

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.

cfleming20:02:17

I’ll take a look at that, thanks.

alexmiller21: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

alexmiller21:02:45

Would only matter if using main or JVM opts

cfleming21:02:16

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

alexmiller21:02:51

Well, not that then

alexmiller21:02:44

Unless you’re calling the scripts nses

alexmiller21: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

cfleming21:02:32

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

cfleming03:02:00

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: https://github.com/cursive-ide/cursive/issues/2511

cfleming03:02:50

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

alexmiller05:02:58

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