Fork me on GitHub
#cider
<
2019-10-24
>
jrwdunham01:10:39

Hey cider-maniacs. I'm using spacemacs and cider and I'm an emacs ignoramus. I'm wondering if there is a standard technique for refreshing my dependencies after I update my project.clj (or deps.edn) without quitting spacemacs and starting it up again (as I'm currently doing). cider-restart doesn't seem to do it. Thanks in advance for any help.

dpsutton01:10:11

Cider-quit and then jack in again

dpsutton01:10:47

You need to dump the process and restart. Killing emacs accomplishes that but is a bit bigger fly swatter than what is required

jrwdunham04:10:55

thanks @dpsutton

bozhidar06:10:09

Just as an FYI - cider-restart restarts only the connection to the nREPL server, not the nREPL server itself.

bozhidar06:10:58

Thereโ€™s sesman-restart command which does what you want - C-c C-s r.

ch09:10:07

Hi, I am new clojure and try to set it up with emacs but it doesnt appear in the package list. I am using the clojure friendly config from the book for the brave and true and also tried to install via the Melpa repo instructionshttp://stable.melpa.org/#/cider as well as the additions mentioned here https://docs.cider.mx/cider/basics/installation.html it just does not appear. Using it on windows 10. any help appreciated!

ch09:10:07

Hi, I am new clojure and try to set it up with emacs but it doesnt appear in the package list. I am using the clojure friendly config from the book for the brave and true and also tried to install via the Melpa repo instructionshttp://stable.melpa.org/#/cider as well as the additions mentioned here https://docs.cider.mx/cider/basics/installation.html it just does not appear. Using it on windows 10. any help appreciated!

qythium09:10:52

what's the value of your package-archives?

ch09:10:06

How do I check this, I am new to emacs

qythium09:10:35

C-h v ( describe variable ), then type package-archives

qythium09:10:58

C-h f describes functions, and C-h k keybindings, those are your most helpful friends for starting out on Emacs ๐Ÿ™‚

ch09:10:13

Many thanks ๐Ÿ™‚ Its value is (("gnu" . ""))

qythium09:10:24

yup, you need to add Melpa to that list

qythium09:10:22

(add-to-list 'package-archives
             '("melpa" . ""))

qythium09:10:52

put that in your init file

ch10:10:24

That is the strange thing, I have it in my ini file

qythium10:10:29

Where did you name and place your init file?

qythium10:10:38

make sure it's not being shadowed by anything else

qythium10:10:37

eg. /.emacs takes precedence over a /.emacs.d directory

qythium10:10:11

Honestly I don't like that Brave Clojure starts out with asking people to learn Emacs, you should use whatever editor you're already using and comfortable with

qythium10:10:36

Especially on Windows which I believe has its own set of issues with Emacs

ch10:10:15

It definetly has not only with Emacs. It is a breeze on linux or Mac and installing clojure on Win was already complicated due to the windows security rules and powershell etc

ch10:10:22

The emacs directory is in the user folder and on in AppData Roaming I guess this could be the reason

jr0cket10:10:51

@ch the Emacs setup in BraveClojure is really out of date. Ignore that setup and use the excellent docs at https://docs.cider.mx/cider/basics/installation.html

ch10:10:58

I used the one from the github repo which was updated some month ago. Will check the above docs many thanks!

finn.volkel14:10:33

Any evil users here? If so, have you somehow setup some cider-eval for visual selection?

qythium00:10:19

I use evil + lispyville, and lispy-eval works out of the box with visual selection

qythium00:10:32

which I have bound to S-RET

qythium00:10:21

but you could always define your own:

(evil-define-key 'visual clojure-mode-map ... 'cider-eval-region)

finn.volkel11:10:03

The visual selection actually works out of the box with C-c C-v r, but I didn't switch the namespace so I thought it wasn't. My bad.

drewverlee18:10:48

When running cider-jack-in and choosing clojure-cli (deps) 1. is it necessary to specifyi nrepl and any other dependcies for this to work? The docs suggest no. 2. how would one specify any devevelopment dependices? is it jusing an alias like :dev ? does cider know to look for specific keyworks or do i have to specify them when running cider jack in.

jr0cket19:10:48

I believe with Cider 0.23 onwards it should prompt you for aliases to run. Otherwise you can create a dir-local.el file, for example https://practicalli.github.io/blog/posts/cider-jack-in-to-clojure-cli-projects-from-spacemacs/

dpsutton18:10:13

Use a prefix to manually edit the startup string

drewverlee19:10:17

Thanks a ton. I think i sorted it out with your help ๐Ÿ™‚

dpsutton18:10:25

Iโ€™ll look up a var you can use in a second

dpsutton18:10:17

https://docs.cider.mx/cider/config/project_config.html check out cider-clojure-cli-global-options there's an example of what you want right there

dpsutton18:10:50

and to answer your first question, no its not necessary. if you check the *Messages* buffer it will show you the exact command used and you'll see all of the necessary deps injected automatically

dpsutton18:10:18

i've been wanting to make a ticket to show the startup command and cljs repl incovation in the repl alongside the startup banner to show that CIDER does no magic at all and just starts nrepl for you

dpsutton18:10:33

so its easy to start it on a command line if desired

dominicm19:10:20

Cross injection of ideas: vim dispatch has a x11 command which will start a terminal which is detached from the current process.

dominicm19:10:39

Might be a nice way to support closing emacs and opening it again

dominicm19:10:52

There's a Windows one too