This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-01
Channels
- # beginners (133)
- # boot (59)
- # cider (5)
- # cljs-dev (30)
- # cljsrn (23)
- # clojure (212)
- # clojure-austin (3)
- # clojure-brasil (1)
- # clojure-chicago (5)
- # clojure-italy (10)
- # clojure-russia (5)
- # clojure-serbia (1)
- # clojure-spec (34)
- # clojure-turkiye (2)
- # clojure-uk (132)
- # clojurescript (163)
- # clojutre (1)
- # cursive (5)
- # datomic (58)
- # emacs (42)
- # events (1)
- # graphql (26)
- # hoplon (16)
- # jobs (1)
- # lumo (27)
- # numerical-computing (3)
- # off-topic (127)
- # om (9)
- # onyx (24)
- # re-frame (20)
- # reagent (20)
- # ring-swagger (14)
- # sql (19)
- # unrepl (28)
- # untangled (3)
- # vim (8)
- # yada (17)
I wrote this last night:
function! RunRepl(cmd)
tabnew
if executable('rlwrap')
call termopen('rlwrap ' . a:cmd)
else
call termopen(a:cmd)
endif
set syntax=clojure
tabprevious
endfunction
let s:clojure_deps = ['cider/cider-nrepl:0.15.0-SNAPSHOT', 'refactor-nrepl:2.2.0']
let s:boot_middleware = ['cider.nrepl/cider-middleware', 'refactor-nrepl.middleware/wrap-refactor']
function! BootRepl(...)
let l:boot_string = 'boot -i "(require ''cider.tasks)"'
for dep in s:boot_deps
let l:boot_string .= ' -d '.dep
endfor
let l:boot_string .= ' cider.tasks/add-middleware'
for middleware in s:boot_middleware
let l:boot_string .= ' -m '.middleware
endfor
if a:0 > 0 && a:1 != ''
call RunRepl(l:boot_string.' '.join(a:000, ' '))
else
call RunRepl(l:boot_string.' dev')
endif
endfunction
It allows you to run :Boot [optional task name]
and it will inject cider & start boot.Thinking of turning it into a separate plugin that works for lein too. Entirely by copying the way cider.el does this. Thoughts?
Personally I like to see good ideas and improved workflows from any source integrated into my own. Recently every time I have started a repl I have wondered why a function doesn't exist to do it for me. I give it a thumbs up (+1 for a lein version).
@dominicm next time you visit cph, please remember to collect all your 🍻
@zamaterian will I see you in Berlin again this year?