Fork me on GitHub
#cursive
<
2017-04-10
>
denik03:04:53

Also, is there a way to add profiles from project.clj for cursive to check the dependencies of?

denik03:04:18

It looks like it only cares about top level and “dev”

cfleming03:04:06

@denik re: profiles, you mean when it’s syncing deps to the project?

cfleming03:04:29

You can do that in the Leiningen toolwindow. View-&gt;Tool windows-&gt;Leiningen. Open out the Profiles dropdown, and then select the profiles you’d like to use. Then press the refresh button.

cfleming03:04:28

re: your run problem, you can’t use run like that in this config. This config panel is only the rough equivalent of lein repl.

cfleming03:04:04

You can run an arbitrary lein command using a leiningen run config, so Run->Edit configurations…, press +, select “Leiningen”.

cfleming03:04:14

Unfortunately this doesn’t tie the REPL in in any useful way.

cfleming03:04:53

How are you trying to run the REPL? Are you using something like the CLJS quick-start?

denik04:04:04

@cfleming thanks profiles solved the deps problem

denik04:04:31

for the repl I’m using lein-figwheel’s cursive setup

cfleming04:04:05

Ok, that creates a script using figwheel-sidecar, right?

cfleming04:04:30

Actually, sorry, I see what you’re doing there in the config screenshot.

cfleming04:04:46

You want to use a clojure.main REPL, third option.

cfleming04:04:35

Then I think you can put script/figwheel.clj in your parameters.

denik04:04:20

the problem with clojure main is that it doesn’t seem to pickup profiles

cfleming04:04:23

If not, you can just run it without that, and (load-file "script/figwheel.clj")

cfleming04:04:57

No, but you shouldn’t need that now you’ve corrected the profiles used to sync your project.

cfleming04:04:45

clojure.main will just use the dependencies that are added to your project. If you’ve successfully synced the project with the frontend-dev deps, they’ll be there when you run clojure.main.

denik04:04:57

running it…

denik04:04:03

wow, everything works now! thanks @cfleming, had no idea cursive was so flexible

cfleming04:04:17

No worries, glad it’s working!

cfleming04:04:46

FWIW the next thing I’m going to work on (after bugs in the current EAP cycle) is native Figwheel integration.

cfleming04:04:56

So this will hopefully just be one-click at that point.