Fork me on GitHub
#cursive
<
2017-01-29
>
andrzejsliwa09:01:08

I wonder if there is a way to make auto require with cursive?

andrzejsliwa09:01:17

similar to clj-refactor

jumar12:01:25

is there a way how to make Cursive recognize js/require et al. ?

jumar12:01:52

Let’s say I have following line of code (def react-native (js/require “react-native”))

jumar12:01:59

it marks “js/require” as unresolved

pgmcgee12:01:50

hey guys, i just started playing around with cursive, and on a simple program: https://www.refheap.com/124794, i’m getting “defroutes cannot be resolved”, “GET cannot be resolved”, and “route/not-found cannot be resolved"

pgmcgee12:01:05

anyone know why cursive isn’t properly parsing the :requires

Pablo Fernandez12:01:44

pgmcgee how is defroutes defined?

yonatanel16:01:05

Is there a way to see multimethod implementations and move to them from defmulti or from defmethod?

Pablo Fernandez16:01:17

what do you mean by move them?

eslachance16:01:20

Would anyone perhaps know what would cause my code to not be loaded in REPL when I start it? Aka when I hit that Run 'REPL' button, it starts, but nothing in my namespace is loaded. I have to select everything and run it. But this only happens in one project, not the other. Maybe a config I have different? Not sure what, though.

eslachance16:01:01

(Obviously I'm in IntelliJ and use Cursive)

yonatanel16:01:56

@pupeno I mean "autoscroll" to them

yonatanel16:01:31

@eslachance You probably need something like this in your project.clj file (the :repl-options part):

:profiles
  {:uberjar
   {:aot :all}
   :dev
   {:source-paths ["dev"]
    :repl-options {:init-ns your.dev.ns}}}

eslachance16:01:39

Hmm. my :profiles is identical in both project.clj however.

eslachance16:01:06

ahhhh maybe it's this: :main ^:skip-aot dtbot.core

eslachance16:01:13

that's the one that works.

eslachance16:01:05

Let's try it anyway.

eslachance16:01:27

Oh yeah! Look at that. That was it.

yonatanel16:01:19

just because you didn't define :main?

eslachance16:01:59

Apparently so. This is a library so it doesn't "do" anything on its own. It just defines a lot of stuff 🙂

eslachance17:01:59

Just to put things into perspective, I'm pretty new to clojure and I'm attempting to write a complete library for Discord Bots so... I have challenges ahead of me.

yonatanel17:01:04

I wouldn't have thought a lib needs :main, but I'll keep that in mind next time something doesn't work.

eslachance17:01:45

Well, this is more a question of being able to use the lib from its own repl. Until now I'd been loading a "client" that used the library but doing lein install from the lib and reloading my client every time defeats the awesomeness of having a REPL in my IDE in the first place >.<

eslachance17:01:42

I daresay I probably just need to figure out a better workflow for development.

eslachance17:01:07

But this is quite off topic of this channel.

yonatanel17:01:24

@eslachance This is not cursive related at all, but I should have realized it much earlier. When init-ns is not defined, REPL uses :main: https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L359

eslachance17:01:14

:thinking_face:

eslachance17:01:20

I still have a lot to learn for sure.