All Projects → nrepl → lein-nrepl

nrepl / lein-nrepl

Licence: EPL-1.0 license
A simple Leininingen plugin to start nREPL 0.4+

Programming Languages

clojure
4091 projects

Projects that are alternatives of or similar to lein-nrepl

asciidoctor-lein-plugin
A Leiningen plugin for generating documentation using Asciidoctor
Stars: ✭ 26 (+36.84%)
Mutual labels:  leiningen, lein, lein-plugin
doo-chrome-devprotocol
A runner for doo which runs tests in Chrome, using the Chrome Dev Protocol with no need for karma or npm.
Stars: ✭ 27 (+42.11%)
Mutual labels:  leiningen, lein
Cljfmt
A tool for formatting Clojure code
Stars: ✭ 859 (+4421.05%)
Mutual labels:  leiningen
vim-jack-in
cider-jack-in for vim
Stars: ✭ 42 (+121.05%)
Mutual labels:  leiningen
Jitpack.io
Documentation and issues of https://jitpack.io
Stars: ✭ 2,156 (+11247.37%)
Mutual labels:  leiningen
Lein Plantuml
A Leiningen plugin for generating UML diagrams using PlantUML
Stars: ✭ 43 (+126.32%)
Mutual labels:  leiningen
Lein Fore Prob
A leiningen plugin to make a local copy of a problem from 4clojure
Stars: ✭ 13 (-31.58%)
Mutual labels:  leiningen
Lein template descjop
A Leiningen template(Clojure/ClojureScript Project) for Web based desktop application with Electron (atom-shell).
Stars: ✭ 394 (+1973.68%)
Mutual labels:  leiningen
cljsee
Backporting cljc
Stars: ✭ 26 (+36.84%)
Mutual labels:  leiningen
Reagent Figwheel
Leiningen template for Reagent applications in Clojurescript with Figwheel. Optionally includes secretary, cljs.test, garden, less, cider, devcards, cljs-devtools, re-risk
Stars: ✭ 161 (+747.37%)
Mutual labels:  leiningen
lein-jmh
Leiningen plugin for jmh-clojure
Stars: ✭ 17 (-10.53%)
Mutual labels:  leiningen
Antq
Point out your outdated dependencies.
Stars: ✭ 157 (+726.32%)
Mutual labels:  leiningen
Lein Jupyter
A Leiningen plugin to integrate clojure with jupyter notebook
Stars: ✭ 97 (+410.53%)
Mutual labels:  leiningen
Google-Authenticator
Clojure program to compute your google authenticator OTP using TOTP
Stars: ✭ 23 (+21.05%)
Mutual labels:  leiningen
dotfiles
These are my dotfiles. All the config stuff that I use is here.
Stars: ✭ 16 (-15.79%)
Mutual labels:  lein
Lein Ring
Ring plugin for Leiningen
Stars: ✭ 485 (+2452.63%)
Mutual labels:  leiningen
Lein Tools Deps
A leiningen plugin that lets you share tools.deps.alpha dependencies in your leiningen project
Stars: ✭ 149 (+684.21%)
Mutual labels:  leiningen
Lein Native Image
A Leiningen plugin to build GraalVM native images
Stars: ✭ 216 (+1036.84%)
Mutual labels:  leiningen
spring-boost
Introduce Clojure and live-coding power to your Spring Boot application!
Stars: ✭ 23 (+21.05%)
Mutual labels:  nrepl
lein-jlink
A lein plugin creates and manages custom java environment
Stars: ✭ 59 (+210.53%)
Mutual labels:  leiningen

lein-nrepl

A Leiningen plugin to start an nREPL server.

Why?

Some of you might be wondering why is this plugin needed - after all lein repl starts an nREPL server, doesn't it?

The problem is that lein repl is still not updated to work with nREPL 0.4+ (see technomancy/leiningen#2444), which means that in the mean time it's hard for people who want to run the new nREPL to do so.

This plugin is very minimalistic, doesn't aim to replicate all of the functionality of lein repl, but it gets the job done (and it hopefully won't be needed forever).

Usage

Put [nrepl/lein-nrepl "0.3.2"] into the :plugins vector of your :user profile.

Afterwards run the following command:

$ lein nrepl

That will start an nREPL server with on a random port and connect a REPLy-powered REPL to it.

Supported Options

  • :port — defaults to 0, which autoselects an open port

  • :bind — bind address, by default "::" (falling back to "localhost" if "::" isn't resolved by the underlying network stack)

  • :handler — the nREPL message handler to use for each incoming connection; defaults to the result of (nrepl.server/default-handler)

  • :middleware — a sequence of vars or string which can be resolved to vars, representing middleware you wish to mix in to the nREPL handler. Vars can resolve to a sequence of vars, in which case they'll be flattened into the list of middleware.

  • :headless - Defaults to false. Controls whether to start an interactive REPL (powered by REPLy) or not.

  • :block — Defaults to true. Set it to false for relinquishing control to the next Leiningen task: e.g lein do nrepl :block false, test-refresh. Note that with a false value and no next Lein task to run, lein-nrepl will immediately close. This option is ignored unless :headless is also true.

Using with CIDER

You can start a CIDER-capable server like this:

$ lein nrepl :middleware "['cider.nrepl/cider-middleware]"

Note that this currently requires cider-nrepl 0.18.0+ to be in your deps, as earlier cider-nrepl releases depend on the legacy tools.nrepl. You can simply put the dependency in your :dev profile (it should be a regular dependency, not a plugin).

Afterwards you can simply do C-c C-x c c to connect from CIDER to the running server.

Using this with cider-jack-in is a bit more involved currently as you can't just replace lein repl with lein nrepl in your CIDER config, because they function a bit differently. If you want to use lein nrepl with cider-jack-in it's current best to simply disable cider-inject-dependencies-at-jack-in and rely on deps specified in your profiles. Here's a simple Emacs config:

(setq cider-inject-dependencies-at-jack-in nil)
(setq lein-parameters "nrepl")

And here's a sample profiles.clj file for you:

{:user
 {:dependencies [[cider/cider-nrepl "0.18.0"]]
  :plugins [[nrepl/lein-nrepl "0.3.2"]]}}

License

Copyright © 2018 Bozhidar Batsov

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].