Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slimv setup for clojure

Tags:

vim

clojure

slimv

Has anyone recently tried to setup slimv for clojure that would be willing to describe how to do so? Slimv will currently autodetect lisp on my machine but fails to load on .clj files. I've also added the following to my .vimrc

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

but it has no effect (lein is installed and executable).

Sorry if this is a basic question but I am very new to both vim and clojure.

like image 669
oxdeadlocc Avatar asked Jun 27 '11 22:06

oxdeadlocc


1 Answers

  • First you should check in your terminal command prompt that lein swank does really run the swank server from within the directory where your .clj file resides. If it doesn't start then you need to make a command that runs the swank server, then embed it in '! xterm -e {swank_command} &' and store it in g:slimv_swank_clojure.
  • If the swank command looks OK, then you should check it from within Slimv via :echo SlimvSwankCommand() that prints the actual swank command built and used by Slimv.
  • You may also run the swank server in a separate terminal window outside of Vim, Slimv will connect it if the port number is the same on both sides (4005 by default).
  • There is another Swank server embedded in Slimv, but this is only autodetected if the lein command does not exits for the user (and g:slimv_swank_clojure is not explicitly defined).
  • If still no luck then please contact me, I'm the author of Slimv, you can find my email address in the documentation.
like image 109
Tamas Kovacs Avatar answered Oct 28 '22 09:10

Tamas Kovacs