Fork me on GitHub
#cider
<
2020-06-21
>
Quentin Le Guennec12:06:53

Hi, I need to be able do detach the cider process such as when I exit emacs, cider-jack-in-cljs doesn't fetch dependencies again. Is that possible?

practicalli_john13:06:12

Unless I miss-understand what you are doing, project dependencies for projects are saved locally, so unless you update the versions of dependencies then they are only downloaded once.

Quentin Le Guennec13:06:38

yes, but for some reason, there are still fetches happening. When I deactivate my VPN (where the dependencies are downloaded), I cannot jack-in.

l0st3d10:06:55

You can start the JVM process from a shell and then connect to it from Emacs using cider-connect or cider-connect-cljs . If you need to know what Cider is running when you call cider-jack-in, you could look in *messages* where Emacs logs to, or jack in and look in your process list, but it tries to detect what you're using to start your REPL (lein, boot, clj) and injects some dependencies for things like Cider middleware. These are controlled by your settings in Cider.

Quentin Le Guennec12:06:34

(the issue here is that in my case, fetching dependencies takes a lot of time, and I restart emacs quite often)

l0st3d10:06:44

Why are you restarting Emacs so often? I only restart when I reboot. I start Emacs with --daemon and run emacsclient -c -nw file.clj when I want to edit something from the terminal (and C-x # to tell Emacs I'm done editing that file or C-x 5 0 to close the frame). I also have this in my .zshrc - bindkey -s "^x^f" $'^aemacsclient -c -nw ' for those times when I accidentally hit C-x C-f in the terminal ;)

practicalli_john13:06:26

Is there a list of all the variables I can set in CIDER? I am creating some example .dir-locals.el files and would like to know what is possible. There are many examples sprinkled in the documentation, https://docs.cider.mx/cider/0.25/config/basic_config.html but it would be useful to have a list of them for reference. Are they all defcustom names in the cider project? If so, I can use helm-ag to grab them.

dpsutton14:06:43

That’s probably essentially all of them.

dpsutton14:06:02

You could probably use emacs apropos to grab them

dpsutton14:06:10

If there’s a version for just vars

practicalli_john15:06:58

I created this list from all the defcustom definitions in the CIDER project, there are quite a few. https://practicalli.github.io/spacemacs/reference/cider/configuration-variables.html

dpsutton15:06:29

Can you easily add the docstrings to that?

dpsutton15:06:31

That would be a lovely reference

dpsutton15:06:45

To browse and point people to when asking about features

bozhidar15:06:24

M-x customize-group RET cider RET 😉

dpsutton15:06:38

i never use customize. i prefer to set them explicitly in my init

bozhidar16:06:47

I never use it myself, but it’s still a great way to list all the config options of a certain package.

practicalli_john17:06:06

@dpsutton good idea about the docstrings... I will test my Emacs-fu 🙂