cursive

Issues at: https://git.io/cursive-issues
jasmith 2021-02-20T00:15:45.000600Z

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!

jasmith 2021-02-20T21:06:53.014700Z

I will take a look. Thanks!

jasmith 2021-02-20T21:36:15.018900Z

Great! That helped fix the issue.

gibi 2021-02-20T16:56:49.003700Z

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

kari 2021-02-20T17:24:17.004100Z

Nope. You can send any form to REPL.

kari 2021-02-20T17:25:21.004700Z

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

🙌 1
gibi 2021-02-21T09:51:27.029600Z

@cfleming yes Catalina 10.15.7

gibi 2021-02-21T09:51:38.029800Z

(apologies for the late reply)

kari 2021-02-20T17:27:30.006200Z

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)

kari 2021-02-20T17:36:39.006600Z

Every clojurian has a hot key for that functionality.

kari 2021-02-20T17:38:52.006800Z

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.

gibi 2021-02-20T17:49:42.007Z

I can imagine, thanks very much @kari.marttila

gibi 2021-02-20T17:49:54.007200Z

I’m trying to get things right with my configuration

gibi 2021-02-20T17:51:00.007400Z

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.

kari 2021-02-20T17:51:09.007600Z

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
kari 2021-02-20T17:52:24.007900Z

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

kari 2021-02-20T17:53:32.008100Z

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/

kari 2021-02-20T17:54:14.008400Z

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

kari 2021-02-20T17:55:57.008600Z

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

gibi 2021-02-20T17:56:11.008800Z

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

kari 2021-02-20T17:57:10.009Z

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

kari 2021-02-20T17:57:17.009200Z

... never used it myself.

gibi 2021-02-20T17:57:30.009400Z

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.

gibi 2021-02-20T17:57:56.009600Z

thanks for the links to paredit and parinfer 👍

kari 2021-02-20T17:59:01.009800Z

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

👍 1
kari 2021-02-20T17:59:41.010Z

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

kari 2021-02-20T18:01:16.010300Z

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

kari 2021-02-20T18:04:50.010500Z

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/

gibi 2021-02-20T18:16:02.011Z

thanks! 🙂

mike_ananev 2021-02-20T20:11:50.013900Z

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

cfleming 2021-02-22T03:51:00.036900Z

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

cfleming 2021-02-22T03:52:50.037200Z

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

alexmiller 2021-02-22T05:01:58.037400Z

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

cfleming 2021-02-20T20:39:02.014100Z

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

cfleming 2021-02-20T20:40:29.014300Z

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.

cfleming 2021-02-20T20:41:17.014500Z

I’ll take a look at that, thanks.

alexmiller 2021-02-20T21:13:27.014900Z

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

alexmiller 2021-02-20T21:13:45.015600Z

Would only matter if using main or JVM opts

cfleming 2021-02-20T21:14:16.015800Z

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

alexmiller 2021-02-20T21:14:51.016200Z

Well, not that then

alexmiller 2021-02-20T21:15:44.016900Z

Unless you’re calling the scripts nses

alexmiller 2021-02-20T21:16:06.017400Z

High level change log is at https://clojure.org/releases/tools#v1.10.2.790

alexmiller 2021-02-20T21:17:11.018700Z

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

cfleming 2021-02-20T21:48:32.019100Z

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

gibi 2021-02-20T22:09:25.019300Z

@cfleming omg this has actually fixed it!

gibi 2021-02-20T22:09:32.019500Z

thank you so much

gibi 2021-02-20T22:09:44.019700Z

what’s the best way to document this misbehaviour?

cfleming 2021-02-20T22:27:30.019900Z

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.

cfleming 2021-02-20T22:32:38.020100Z

@francesco.losciale 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?