This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-14
Channels
- # beginners (53)
- # boot (93)
- # cider (13)
- # cljs-dev (17)
- # cljsrn (20)
- # clojars (1)
- # clojure (349)
- # clojure-austin (1)
- # clojure-gamedev (5)
- # clojure-italy (1)
- # clojure-nl (16)
- # clojure-poland (1)
- # clojure-russia (26)
- # clojure-spec (57)
- # clojure-uk (6)
- # clojurebridge (5)
- # clojurescript (145)
- # code-reviews (2)
- # core-async (88)
- # cursive (1)
- # datomic (3)
- # defnpodcast (10)
- # events (7)
- # hoplon (20)
- # instaparse (1)
- # jobs-discuss (15)
- # keechma (26)
- # lein-figwheel (2)
- # leiningen (1)
- # liberator (11)
- # lumo (40)
- # off-topic (54)
- # om (32)
- # onyx (11)
- # pedestal (6)
- # perun (4)
- # planck (6)
- # re-frame (4)
- # reagent (12)
- # ring (3)
- # ring-swagger (10)
- # rum (1)
- # testing (4)
- # timbre (1)
- # unrepl (20)
- # untangled (111)
- # vim (1)
How can I set clojure-indent-style
as a file-local variable?
To answer my own question,
;; Local Variables:
;; clojure-indent-style: always-indent
;; End:
(no leading colon on always-indent
)
Is there any way to get the debugger to break at exactly the point in the function where you set it at? seems to go through every s-expression prior to it first (or is this just some weirdness with spacemacs?)
@voxdolo see https://github.com/clojure-emacs/cider/blob/master/doc/debugging.md for info on #break
#dbg
tanzoniteblack okay, it's definitely spacemacs weirdness (or maybe just missing functionality) then, since there's no equivalent binding for #break
... it just binds #dbg
on the function you're inside of
you don't need a binding for #break
if you have a function like
(defn test-fn [x]
(if (even? x)
#break (* 3 x)
(* 2 x)))
and then you eval it with cider-eval-defun-at-point
(`C-M-x` in normal keybindings)
it will open the debugger if you get to the line that has the #break
(i.e. pass in an even number)
(defn test-fn [x]
(if (even? x)
#dbg (* 3 (inc x))
(* 2 x)))
with #dbg
works the same, except instead of only showing you the results for the entire sexp (* 3 (inc x))
like #break
would, #dbg
will let you step through all the sexp inside the fn@tanzoniteblack I think Spacemacs breaks #dbg
and #break
. normal function invocation (this happens to be a web app endpoint controller-style function) doesn't pause execution at all and C-M-x
isn't really a great option here because there's a rather large and complicated request map required as input.