I usually do it with cljstyle with the integration with file watcher. https://github.com/greglook/cljstyle https://cdn-ak.f.st-hatena.com/images/fotolife/e/egs33/20200214/20200214162956.png
Something strange. In my require i have
[re-frame.context :as re-frame :refer [defc]]
(it's a fork of re-frame)
But later down in the text, where i have re-frame/subscribe
cursive offers to require the ns
Why does cursive format tagged literals like this:
#kaocha/v1
{:plugins [:kaocha.plugin/profiling
:kaocha.plugin/print-invocations
:kaocha.plugin/cloverage
:kaocha.plugin.alpha/spec-test-check]}
and not like
#kaocha/v1
{:plugins [:kaocha.plugin/profiling
:kaocha.plugin/print-invocations
:kaocha.plugin/cloverage
:kaocha.plugin.alpha/spec-test-check]}
?Could be a similar artifact in cljfmt
, I can't see that the behaviour is documented.
Great question, I have no idea - I’d have to look at that.
I’m reading in the docs that ~file-namespace is supposed to sub in REPL commands as the current namespace. It is not expanding for me. Is this a typo in docs?
hm…strangely, it expands if I put it on a line by itself
I figured it out. Strange issue, but here it is:
I wanted to reload the file myself (so I could catch compiler exceptions), and I tried this: (require '~file-namespace :reload)
in the REPL command. That did not expand; however, if I do this it works:
(let [n '~file-namespace]
(require n :reload))
Thanks, I’ll take a look - that should work anywhere.
cljfmt
does something similar, although only one space indent. Maybe it is to show what is tagged? It makes a bit of extra sense when readers stack. Like so:
#kaocha/v1
#foo/bar
#baz
{:plugins [:kaocha.plugin/profiling
:kaocha.plugin/print-invocations
:kaocha.plugin/cloverage
:kaocha.plugin.alpha/spec-test-check]}