Add easy fireplace connect command for non lein projects

pull/2/head
Ensar Sarajčić 2021-12-01 14:04:59 +01:00
parent 992bfbcf16
commit fabad863a1
1 changed files with 9 additions and 0 deletions

View File

@ -1,2 +1,11 @@
setlocal ts=2 sts=2 sw=2 expandtab autoindent
let b:undo_ftplugin .= '|setlocal ts< sts< sw< expandtab< autoindent<'
function s:FireplaceStartAndConnect()
let port = luaeval('math.random(35000, 39999)')
silent execute "Dispatch lein repl :start :port " . l:port
sleep 3
execute "FireplaceConnect nrepl://localhost:" . l:port
endfunction
command! -nargs=0 FireplaceStartLeinRepl call <SID>FireplaceStartAndConnect()