File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -43,3 +43,21 @@ function! jack_in#lein(...)
43
43
endif
44
44
call s: RunRepl (l: lein_string .' ' .l: lein_task )
45
45
endfunction
46
+
47
+ function ! jack_in#clj (... )
48
+ let l: clj_string = ' clj -Sdeps'
49
+ let l: deps_map = ' {:deps {'
50
+ let l: cider_opts = ' -e '' (require (quote cider-nrepl.main)) (cider-nrepl.main/init ['
51
+
52
+ for [dep , inj] in items (g: jack_in_injections )
53
+ let l: deps_map .= dep . ' {:mvn/version "' . inj[' version' ] . ' "} '
54
+ let l: cider_opts .= ' "' .inj[' middleware' ].' "'
55
+ endfor
56
+
57
+ let l: deps_map .= ' }}'
58
+ let l: cider_opts .= ' ])'' '
59
+
60
+ let l: command = l: clj_string . ' '' ' . l: deps_map . ' ' ' ' . l: cider_opts . ' ' . join (a: 000 , ' ' )
61
+
62
+ call s: RunRepl (l: command )
63
+ endfunction
Original file line number Diff line number Diff line change @@ -17,3 +17,4 @@ let g:jack_in_injections =
17
17
18
18
command ! -nargs =* Boot call jack_in#boot (<q-args> )
19
19
command ! -nargs =* Lein call jack_in#lein (<q-args> )
20
+ command ! -nargs =* Clj call jack_in#clj (<q-args> )
You can’t perform that action at this time.
0 commit comments