Skip to content

Commit a89a333

Browse files
Support init-opts in Clj
-e is an init-opt, so is permitted to be run with other init-opts. This way a user can specify -e or -i flags to be run before the nrepl starts, e.g. to load a dev tool.
1 parent 21ce855 commit a89a333

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

autoload/jack_in.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,17 @@ endfunction
6767
function! jack_in#clj_cmd(...)
6868
let l:clj_string = 'clj'
6969
let l:deps_map = '{:deps {nrepl {:mvn/version "0.7.0"} '
70-
let l:cider_opts = "-m nrepl.cmdline --middleware '["
70+
let l:cider_opts = '-e "(require ''nrepl.cmdline) (nrepl.cmdline/-main \"--middleware\" \"['
7171

7272
for [dep, inj] in items(g:jack_in_injections)
7373
let l:deps_map .= dep . ' {:mvn/version "' . inj['version'] . '"} '
7474
let l:cider_opts .= ' '.inj['middleware']
7575
endfor
7676

7777
let l:deps_map .= '}}'
78-
let l:cider_opts .= "]'"
78+
let l:cider_opts .= ']\")"'
7979

80-
return l:clj_string . ' ' . join(a:000, ' ') . ' -Sdeps ''' . l:deps_map . ''' ' . l:cider_opts . ' '
80+
return l:clj_string . ' -Sdeps ''' . l:deps_map . ''' ' . join(a:000, ' ') . ' ' . l:cider_opts . ' '
8181
endfunction
8282

8383
function! jack_in#clj(is_bg, ...)

0 commit comments

Comments
 (0)