Question

I can successfully configure both Slimv and VimClojure but I wonder if I can set any of those to work with any swank server (ritz for example).

Thanks!

Was it helpful?

Solution

In theory Slimv can connect to any swank server, but there is no autodetection currently for ritz-swank. So if you want to use ritz, then you need to start the swank server manually, or define the shell command for Slimv that starts the swank server, e.g. by adding a similar line to your .vimrc (assuming you run ritz on Linux via Leiningen):

let g:slimv_swank_clojure = '! xterm -e lein ritz 4005 &'

Recent versions of ritz-swank had some protocol changes, so I suggest that you get the most recent Slimv version from the repository, which adds a new function 'Break on Exception'.

You can of course use swank-clojure as well via lein swank, and Slimv can autodetect and run it for you.

I'm the author of Slimv, I plan to add more support for ritz, as swank-clojure seems to be abandoned now. If you have any problems with Slimv, please feel free to contact me.

EDIT: I have now added a simple autodetection for ritz-swank: if Slimv finds ~/.lein/plugins/lein-ritz*.jar then it is able to start ritz-swank by pressing ,c.

OTHER TIPS

Here's an nREPL option as well: https://github.com/tpope/vim-foreplay

The creator of VimClojure recommended using that for nREPL for the time being - https://groups.google.com/d/msg/vimclojure/B-UU8qctd5A/nHXJiGMkXJsJ

VimClojure does not use swank as backend, so you can't use it with a swank server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top