A fully-featured Leiningen plugin to run a VimClojure server for Leiningen projects.
There are already a number of VimClojure plug-ins out there, some of them called lein-nailgun and others called lein-vimclojure. However, most of them tend to be fairly minimal. In particular, most of them lacked two key features:
- Support for both Leiningen 1.x and Leiningen 2.x projects, and
- The ability to run a standalone REPL in the same process as the server.
While you can install this plug-in by adding it to the :plugins
vector of
your project.clj
, it probably makes more sense to install it as a user-level
plug-in.
Add [lein-tarsier "0.9.2"]
to the plugins
vector of your :user
profile located in ~/.lein/profiles.clj
. For example:
{:user {:plugins [[lein-tarsier "0.9.2"]]}}
Just run:
lein plugin install lein-tarsier 0.9.2
Once the plug-in is installed, running it is as easy as:
lein vimclojure
The plug-in accepts some arguments, described in the next section.
This plug-in supports the following configuration options:
:host
, the host name to use for the VimClojure server, defaults to"127.0.0.1"
:port
, the port the VimClojure server will listen on, defaults to2113
:repl
, a boolean value determining whether the plug-in should launch a REPL, defaults tofalse
You may set these options as follows.
You can set these options using the profile feature of Leiningen 2. For example:
{:user {:plugins [[lein-tarsier "0.9.2"]]
:vimclojure-opts {:repl true
:port 42}}}
Additionally, you can modify your project.clj
and add a :vimclojure-opts
mapping, for example:
(defprojct foo "1.0.0"
:vimclojure-opts {:repl true
:port 42})
Finally, you can override any profile- or project-based settings at the command line:
lein vimclojure :repl true :port 42
This plug-in is configured to use version 2.3.3 of the VimClojure server by default. However, you can override this by manually specifying the dependency in your project.
For example, to use version 2.2.0 of the server, you could add the following dependency to your project:
[vimclojure/server "2.2.0"]
In order to minimise confusion between this plug-in and other lein-nailgun
and lein-vimclojure
plug-ins, this plug-in is named lein-tarsier
, in honour
of the animal that appears on the cover of Learning the vi and Vim Editors.
There are a number of features that may be added to the plug-in:
- The ability to hook onto other Leiningen commands
- Jeremy Holland
- Katsunori Kanda
Copyright © 2012 Sattvik Software & Technology Resources, Ltd. Co. All rights reserved.
Distributed under the Eclipse Public License, the same as Clojure.