Fork me on GitHub

Hm. I just upgraded to 1.8.1-eap3 and it broke. I reverted back to lein 2.8.1 and still doesn't work anymore. I am able to run lein repl from command line and then connect as a 'local' remote repl. This is the output of cursive trying to start a repl:


downgrading cursive fixed the problem, i'm now to eap2

Joe R. Smith14:02:33

how do I remove a "resolve <thing> as" ?


Preferences > Languages > Clojure > Symbol resolution


it would be really great if jumping to a spec was a thing

👍 12

Could cursive theoretically do some checking on type hints?

(defn take-number [^Number a] (inc a))
(defn foo []
  (let [^String s "hi"]
    (take-number s))) <--- Nice if I got a red / yellow squiggly

Yehonathan Sharvit18:02:23

I have an issue in Cursive with my source root: In my project.clj, I have :source-paths ["clojurescript-src/src/cljs" "script"] When I open a file under clojurescript-src/src/cljs/audyx/app/init defining a namespace, I see an error

Yehonathan Sharvit18:02:44

I don’t know what to do


From your screenshot, it looks like your audyx folder is also a source path?


File -> Project Structure -> Modules -> (your module) -> sources


Should match what is in the :source-paths above

Yehonathan Sharvit20:02:45

I don’t know how it happened


Did that fix it?

Yehonathan Sharvit20:02:33

I don’t know how to tell cursive to recalculate its source paths


In the short term, you can manually remove the content root from that dialog


When you created your module, did you import from your project.clj file specifically?


If you do that, my sources + dependencies are normally re-read from project.clj on every IDEA startup

Yehonathan Sharvit20:02:49

I don’t remember

Yehonathan Sharvit20:02:58

How can I recreate my module?

Yehonathan Sharvit20:02:16

I don’t really know what a module is by the way


You should be able to fix that by right-clicking on your audix folder and selecting “Unmark as Sources root” from the “Mark Directory As…” submenu

Yehonathan Sharvit20:02:15

The problem with this approach is that every time I change the project.clj, Cursive overwrites my choices


Hmm, I had a similar problem a while ago, something about a stray line in my project.clj file


The Content Roots in cursive should match your project.clj. Cursive shouldn't be adding additional roots


Do you have more than one :source-paths entry in project.clj anywhere?

Yehonathan Sharvit20:02:00

It’s a cljs project, it has one :source-paths entry per cljsbuild entry

Yehonathan Sharvit20:02:14

Anyway, is there a way to reset the project from a Cursive perspective?


A restart of IDEA usually triggers a read from project.clj


There’s also File -> Invalidate Caches / Restart


Would you post your project.clj?

Yehonathan Sharvit21:02:34

I found the issue in my project.clj


:dbg {
        :source-paths [

Yehonathan Sharvit21:02:51

It had some bad source-paths in cljsbuild

Yehonathan Sharvit21:02:36

Another thing: How do we trigger a global search that search also in name of namespaces?


I'm guessing, btw, cursive uses the dev profile

Yehonathan Sharvit21:02:05

I remember that Shift-Shift used to do a global search

Yehonathan Sharvit21:02:37

Now when I type a namespace that has a dash character in it , it doesn’t find it

Yehonathan Sharvit21:02:46

for instance om-extensions finds nothing while om_extensions does

Lennart Buit21:02:03

thats probably because of Java convensions

Lennart Buit21:02:26

I think thats IntelliJ searching, and IntelliJ only understand valid java package names, so thats snake_case

Yehonathan Sharvit21:02:48

clojure namespaces are always with dashes

Yehonathan Sharvit21:02:58

That would be very disappointing


Is there a way to tell Cursive to not index certain directories? It regularly crashes when it tries to index node_modules, and since it doesn’t seem to understand shadow-cljs imports anyway, I don’t get code completion for JavaScript. So I would rather skip the indexing of JS modules and avoid the crashes.


You can try right-clicking the node_modules and selecting 'Mark Directory As Excluded'.