Fork me on GitHub
#cider
<
2019-09-12
>
karol.wojcik09:09:36

@bozhidar 1. I've connected to repsl via cider-jack-in-clj&cljs (I'm using shadow-cljs) 2. When I try to evaluate the form: #?(:cljs (println "Hello")) the expression is send to clj repl instead of cljs. The question is how can I send some expressions to clj repl and some expressions to cljs repl?

bozhidar10:09:14

So, you’re in a cljc buffer, right?

lvbarbosa12:09:47

Guys, is there a way to debug functions defined with custom defns? I'm trying to debug a function declared through prismatic/schema's defn with no success

karol.wojcik13:09:42

@bozhidar Right!

karol.wojcik10:09:48

@bozhidar so there is no option to send value to cljs instead of regular clj repl?

bozhidar11:09:27

At some point I recall we were sending forms to both REPLs when working with cljc, but I’m not quite certain what’s the current state. You can open some ticket and I’ll check this when I can.

nomiskatz13:09:48

@lvbarbosa Just an idea… If CIDER doesn’t support it… if that’s a macro that’s expanding to a defn (I don’t know whether it is), you could use the macroexpansion in place of your definition.

lvbarbosa13:09:06

Oh I thought it would show a text snippet. Well, that's the macroexpansion-1 of a function. I think I now understand why the debugger does not work on this

nomiskatz13:09:31

Maybe you could replace the things in that first let with defs, and then do the defn at the top level (just for debugging purposes). And there’s also that thing after the defn so you’d need that too.

lvbarbosa19:09:05

Sir, apparently there is a way to do it.

lvbarbosa19:09:05

When I try to instrument the function, it triggers the debugger. I was hitting C to continue at that moment. Subsequent calls to the instrumented function would not trigger the debugger

lvbarbosa19:09:35

Instead of continue, if you hit n (`next`), the function is successfully instrumented. Subsequent calls do trigger the debugger

nomiskatz22:09:51

Ah, I think I recall that as a bug in an earlier version of CIDER. Are you on the latest version?

lvbarbosa23:09:24

I'm using the latest version that is on MELPA: 20190911.1917

nomiskatz07:09:43

Do you get the same behaviour when you debug a defn form?

borkdude21:09:29

how can I configure emacs/clojure-mode/cider in such a way that it doesn't indent lines starting with a single semi-colon to the middle of the page?

chepprey21:09:20

☝️oooh i wanna know this too

chepprey21:09:24

I wonder if it's related to classic Emacs Lisp convention at all? https://ftp.gnu.org/old-gnu/Manuals/elisp-manual-20-2.5/html_node/elisp_656.html

chepprey21:09:50

... perhaps the triple-wink will stay aligned to the left?

nomiskatz22:09:03

I have a hook that does (set (make-local-variable 'comment-column) 0) — I think that’s why I don’t have single-semicolon comments jumping.

nomiskatz22:09:59

Yes — I commented that out of my Emacs config and now my single-semicolon comments jump to the middle of the page.