1

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!

ssedano
  • 8,322
  • 9
  • 60
  • 98

3 Answers3

4

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.

Tamas Kovacs
  • 1,495
  • 7
  • 9
  • Hey @Tamas - couple questions: 1. does auto-detection work with lein2? 2. Have you considered adding nrepl support to slimv? Thanks. – devth Nov 10 '12 at 23:34
  • 1
    1.) No, slimv only checks for the presence of `lein`, but if you named lein2 to lein (as I think some tutorials suggest) then slimv will find it. Please drop me a mail if you want a more sophisticated solution. 2.) I must admit that I don't really know nrepl. Slimv targets to be a 'Slime for Vim', so the aim is to provide the same functionality as Slime does for Emacs. Therefore I did not plan to add nrepl support, rather the swank server itself may run on a remote machine. – Tamas Kovacs Nov 17 '12 at 13:07
1

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

bmaddy
  • 876
  • 9
  • 16
0

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

kotarak
  • 17,099
  • 2
  • 49
  • 39
  • I meant to use slimv to connect to swank, and vimclojure for the rest of it. but thanks anyway! – ssedano Oct 04 '12 at 09:30
  • @ssedano Well, that should work. Highlighting and basic completion is mostly independent from the backend. Just do a `let vimclojure#WantNailgun = 0` in your `.vimrc` and you should be set from the VimClojure point of view. – kotarak Oct 05 '12 at 05:49
  • That's what I did, sorry if the question didn't make it clear. Thanks! – ssedano Oct 05 '12 at 07:54