Fork me on GitHub
#cursive
<
2019-02-28
>
helios09:02:20

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: https://pastebin.com/95Dt5Hiz

helios10:02:39

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

Joe R. Smith14:02:33

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

helios15:02:36

Preferences > Languages > Clojure > Symbol resolution

dnolen16:02:15

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

šŸ‘ 12
butterguns16:02:00

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 audyx.app.init, I see an error

Yehonathan Sharvit18:02:44

I donā€™t know what to do

butterguns20:02:21

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

butterguns20:02:58

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

butterguns20:02:18

Should match what is in the :source-paths above

Yehonathan Sharvit20:02:45

I donā€™t know how it happened

butterguns20:02:52

Did that fix it?

Yehonathan Sharvit20:02:33

I donā€™t know how to tell cursive to recalculate its source paths

butterguns20:02:26

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

butterguns20:02:01

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

butterguns20:02:31

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

manutter5120:02:35

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

manutter5120:02:59

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

butterguns20:02:36

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

manutter5120:02:30

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?

butterguns21:02:24

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

manutter5121:02:21

Thereā€™s also File -> Invalidate Caches / Restart

butterguns21:02:45

Would you post your project.clj?

Yehonathan Sharvit21:02:34

I found the issue in my project.clj

butterguns21:02:45

:dbg {
        :source-paths [
          "clojurescript-src/src/cljs/audyx"]

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?

butterguns21:02:01

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

mdhaney23:02:12

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.

dmarjenburgh07:03:29

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