Skip to content

no Leiningen option when importing existing project and no repl under run / tools #3

Closed

Description

@rickr-pax

Ultimate ver 2016.2.5. Had previously installed Cursive plugin then uninstalled it before installing Clojure-kit also uninstalled then re-installed this plugin and still no run / debug / repl ability.

Nice work on code navigation portion!

Thanks,
Rick

Activity

  1. gregsh commented on Nov 19, 2016

    @gregsh
    Owner

    lein (or boot) import is not required, just add project files in any fashion so that required project.clj's show up in project view and that's it. If you want to re-sync dependencies manually open project.clj and look for fading in/out buttons in the upper-right corner.

    To repl just hit ctrl-enter or search for REPL action via go-to-action (ctrl-shift-A). It shall start new repl or connect to a running one automatically.

    There's currently no debugger.

  2. rickr-pax commented on Nov 20, 2016

    @rickr-pax
    Author

    Thank you, I am able to fire up the repl but executing anything directly in it, e.g. '(+ 1 2)' doesn't work. Using the editor and hitting apple-enter works, thought, so i guess that's a reasonable work around for now.

    There are some weird things in the editor though, e.g. using the delete key wipes out an entire region of code!?! ; maybe apple-del should do this but not delete

    And in general looking forward to tighter lein / repl / configuration integration. For example it would great to build a project on the command line such as 'lein new luminus guestbook +h2' and then launch intellij, open the directory and hit 'Run' and have a working repl and the app running.

    Keep up the great work and as for items most important to me, i'd say get everything else working first and then look to the debugger afterwards. lein integration and some kind of working repl while the app is running would be intensely useful (see luminus example above).

    Thanks!

  3. gregsh commented on Nov 20, 2016

    @gregsh
    Owner

    I suggest trying the latest dev build here that shall be released shortly.
    The structural editing issues are fixed there.

    As for REPL integration, here's what I did:

    1. ran lein new luminus guestbook +h2 in Terminal
    2. added guestbook folder so it appeared in Project view (depends on IDE)
    3. opened project.clj and hit command-Enter on an empty line
    4. in the REPL that appeared I ran (guestbook.core/-main)
    user=> 
    user=> (guestbook.core/-main)
    2016-11-20 22:14:07,025 [nREPL-worker-0] INFO  guestbook.env - 
    -=[guestbook started successfully using the development profile]=- 
    2016-11-20 22:14:07,112 [nREPL-worker-0] INFO  luminus.http-server - starting HTTP server on port 3000 
    2016-11-20 22:14:07,146 [nREPL-worker-0] INFO  org.xnio - XNIO version 3.3.6.Final 
    2016-11-20 22:14:07,264 [nREPL-worker-0] INFO  org.projectodd.wunderboss.web.Web - Registered web context / 
    2016-11-20 22:14:07,265 [nREPL-worker-0] INFO  luminus.repl-server - starting nREPL server on port 7000 
    nil
    read config from resource: "config.edn"
    ...
    

    It seems the missing thing is some quick way to run lein / boot targets via some chooser.

    UPD a quicker way without running the main class manually:

    1. add parallel do plugin to project.clj: :user {:plugins [[lein-pdo "0.1.1"]]}
    2. run lein pdo run, repl in Terminal
    3. command-Enter on any form in IDE to show REPL and run the form

    UPD2 Just realised there's a ClojureScript REPL too and there's no way to connect to it from IDE.

  4. rickr-pax commented on Nov 21, 2016

    @rickr-pax
    Author

    Fantastic, these instructions were very handy..might I suggest adding them to the readme as a "quick start" example.

    Also, it took me a while to understand the repl command line behavior. Hitting "enter" (OS X 10.11.5) doesn't execute the expression until you hit command-enter, exactly like what occurs within the editor.

    The result of the eval is then placed "above" the user=> line which i initially thought rather odd (my brain was expecting a command line like output where the output follows the command), but then I realized that there are 2 windows there (the upper one being scrollable). I think some simple indicator such as a faint line or something would have helped reduce the confusion.

    Thanks again!

  5. gregsh commented on Dec 4, 2016

    @gregsh
    Owner

    8d0134b adds Tools | Clojure submenu
    de217cb adds Connect to REPL action
    I believe, that completes this case.

    Feel free to try out the [dev] build while it is not published to plugin repo and comment.

  6. rickr-pax commented on Dec 4, 2016

    @rickr-pax
    Author

    Yes, all covered now thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions