1

How can I run a Clojure project from IntelliJ/Cursive? The run task doesn't show up under Tasks in the Leiningen tool window despite the fact that the help task lists run as an available task. There doesn't seem to be a way to add tasks to the window, either.

Additional info:

  • I used the Windows installer to install Leiningen
  • I followed this Cursive tutorial to set up (created project with lein new, then imported it to IntelliJ)
  • I set up a "Hello World" according to this guide, but running core.clj from the regular menubar doesn't produce output

1 Answer 1

2

If you want to run lein run you can create a new run configuration: menu Run -> Edit Configurations and add new Leiningen configuration providing run in the arguments field.

When you just want to run a namespace you can right click on it in the project browser window and choose Run <your selected namespace name> menu item.

Sign up to request clarification or add additional context in comments.

3 Comments

Usually when I create a new configuration it's available in the drop down menu, however the Leiningen "Run" configuration didn't show up anywhere.
"providing run in the arguments field" - thanks that's the bit I was missing!
I can't believe you actually have to do this for every single project. People create projects and never run them? am I missing something?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.