Fork me on GitHub
#cursive
<
2019-02-05
>
pvillegas1200:02:20

For some reason, when the intellij light bulb icon appears on >defn from [ghostwheel.core :as gw :refer [>defn]]) it does not resolve it to the ghostwheel definition

pvillegas1200:02:43

Does anybody know how cursive / intellj auto detect new libraries in the classpath for this?

cfleming00:02:01

@pvillegas12 What do you mean by “does not resolve it to the ghostwheel definition”? What are you seeing?

pvillegas1200:02:55

having required [ghostwheel.core :as gw :refer [>defn]])

cfleming00:02:04

How is >defn defined in ghostwheel.core?

pvillegas1200:02:39

it is a macro which is similar to defn

pvillegas1200:02:53

I want intellij to basically treat it as a defn

cfleming00:02:14

Yes, but how is it actually defined - is it defined using defmacro or some other macro?

pvillegas1200:02:07

I might be lost on how to make intellij load dependencies

pvillegas1200:02:20

(so that it knows how to resolve these with the lightbulb I was referring to)

cfleming00:02:48

Ok, one sec, I’ll try to reproduce that.

pvillegas1200:02:11

yes, looks like intellij knows about ghostwheel but cannot recognize the macro >defn (even when requiring it)

cfleming00:02:06

@pvillegas12 Which version of ghostwheel are you using?

pvillegas1200:02:26

gnl/ghostwheel {:mvn/version "0.3.5"}

pvillegas1200:02:52

using deps.edn, how do I trigger cursive to load that into the classpath?

cfleming00:02:39

You can do that from the deps toolwindow, View-&gt;Tool Windows-&gt;Clojure Deps, then press the refresh button.

pvillegas1200:02:48

hmmm, that does not help with my problem

pvillegas1200:02:11

I’m not seeing https://cursive-ide.com/userguide/macros.html behavior is what I’m guessing

pvillegas1200:02:57

hmm, also getting weird behavior with spec, getting s/cat can be required

cfleming00:02:12

Cursive can definitely see that macro, so there must be something else going on.

cfleming00:02:39

If you open File-&gt;Project Structure, then select Modules and select your module, under Dependencies do you see gnl/ghostwheel there?

pvillegas1200:02:45

thanks for pointing me in the right direction, I forgot the (:require form… facepalm

cfleming00:02:58

That will do it.