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.
Try this: https://cursive-ide.com/userguide/eap/troubleshooting.html#help-lots-of-symbols-don-t-resolve
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.
@cfleming 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)
Every clojurian has a hot key for that functionality.
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 can imagine, thanks very much @kari.marttila
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.
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. • http://danmidwood.com/content/2014/11/21/animated-paredit.html • https://shaunlebron.github.io/parinfer/
... 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. 🙂
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. 🙂 https://www.metosin.fi/blog/metosin-favorite-editors/
thanks! 🙂
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.
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
Selecting an earlier version, either on the command line or explicitly in Cursive using the “Use tools.deps directly” option should be a workaround.
Well please let me know what it was as I'm surprised behavior has changed
@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.
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.
I’ll take a look at that, thanks.
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
Would only matter if using main or JVM opts
I don’t directly use the cpcache, I just hit the t.d.a API.
Well, not that then
Unless you’re calling the scripts nses
High level change log is at https://clojure.org/releases/tools#v1.10.2.790
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.
@cfleming 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.
@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?