Fork me on GitHub
#cider
<
2019-07-17
>
FiVo07:07:57

Hey newbie here. On some projects when I start the REPL, I start in the namespace 'user and on other in 'my-project.core. Is this somehow specified in some config? How does cider decide in which namespace to start?

clj 4
jumar08:07:28

This is the leiningen thing (if you use it). user is the default for Clojure repl but it should be customizable via the :main config key in the project.clj

FiVo10:07:50

I have the :main set still ends up in user.

bozhidar12:07:05

It’s actually :init-ns which specifies the initial ns.

dmaiocchi12:07:55

Yes the latter is true

dmaiocchi12:07:07

The main is for lein run

jumar13:07:24

Funny enough, when you use lein new app and have just the :main key set to core then lein repl ends up in the core namespace. If you remove the :main key it ends up in the user namespace.

clj 4
FiVo07:07:44

Also is there a cider shortcut to close and go back to the previous buffer when I have opened a cider-doc or cider-error buffer? Or is this rather some emacs related setup?

jumar08:07:09

LIkely just q

clj 4
FiVo08:07:06

thanks, I was using some other mode but that let me to the appropriate function

dmaiocchi17:07:12

I'm trying to activate the cider debug with cider-debug

dmaiocchi17:07:50

but I don't have it/found when I use M-X .. :thinking_face:

dpsutton18:07:58

it's in the manual. but just eval the defun with a prefix. C-u C-M-x

dmaiocchi19:07:03

Yep I did it but I dunno how to run the débugger after that..

dpsutton19:07:28

when the function is invoked it should do everything for you

dmaiocchi19:07:15

Ah OK thx I might missed something then I will retry