Fork me on GitHub

@richiardiandrea It’s mentioned as a breaking change in the changelog, so I think we meant to do it. 😉

👍 1

The idea was to put all the related ns keybindings under the same keymap, so people can find them easier. For a few releases we’ve been trying to reduce the epic amount of top-level keybindings and organize them better.


People will also notice that now all the commands to start CIDER are under C-c C-x and after a few releases we’ll remove the legendary C-c M-j and C-c M-c.

Garrett Hopper14:07:58

Is there a variable to set for the custom cljs repl command in .dir-locals.el?

Garrett Hopper14:07:26

@bozhidar You're removing C-c M-j? 😧


cider-default-cljs-repl i think @ghopper


but that code has changed quite a bit since i've last been in it and i didn't trace it very carefully


(defcustom cider-default-cljs-repl nil
  "The default ClojureScript REPL to start.
This affects commands like `cider-jack-in-cljs'.  Generally it's
intended to be set via .dir-locals.el for individual projects, as its
relatively unlikely you'd like to use the same type of REPL in each project
you're working on."
  :type '(choice (const :tag "Nashorn"  nashorn)
                 (const :tag "Figwheel" figwheel)
                 (const :tag "Node"     node)
                 (const :tag "Weasel"   weasel)
                 (const :tag "Boot"     boot)
                 (const :tag "Shadow"   shadow)
                 (const :tag "Custom"   custom))
  :group 'cider
  :safe #'symbolp
  :package-version '(cider . "0.17.0"))

Garrett Hopper14:07:06

I can set it to custom, but I can't actually set the form that gets used. Unless I'm missing something?

Garrett Hopper14:07:15

Perhaps it can be more than just a symbol?


you can add the custom init function to cider-cljs-repl-types

Garrett Hopper14:07:59

Ah, ok. Is there a good way to do that in .dir-locals.el? (To append and not override)


with the key that you set as the cider-default-cljs-repl above. I don't believe it has to be "Custom" it could be project name and then you make sure there's an init function in that list


you can eval things in dir-locals but i get a little lost in the syntax. alternatively you could just replace the entire list and not append it, just make it the sole list entry

Garrett Hopper14:07:26

Does this look right?

((nil . ((cider-default-cljs-repl . example)
         (cider-cljs-repl-types . ((example "(start-example-cljs-repl)"))))))

Garrett Hopper14:07:05

I get confused by the ($a . $b) and (($a $b)) syntax stuff.


it looks like it needs a function at the end that gets invoked to make sure everything is good to go. you can reuse one of the existing ones or just put a thunk that doesn't throw an error


cider-check-node-requirements is an example


and you're syntax looks right to me


here's mine but i think cider has drifted so this is out of date

((nil . ((cider-lein-global-options . "with-profile dev")
         (cider-default-cljs-repl . figwheel))))

Garrett Hopper14:07:41

Hmm, it's prompting me for the ClojureScript REPL type now. 😕

Garrett Hopper14:07:26

The prompt lists all available types not just my custom added one which is weird, because if I inspect the cider-cljs-repl-types var, it only has mine in it.

Garrett Hopper14:07:27

I guess it uses the global value instead of the buffer-local value.


try m-x hack-local-variables i think i've seen times where it has been "slow" to see new dir locals and then starts working

Garrett Hopper14:07:47

Well, the dir local is working, because I see it when inspecting the variable; it just isn't set globally.


do people use flycheck + squiggly-clojure w/cider? just upgraded to cider 0.18-snapshot and it breaks my setup due to this issue i believe


if not, what do you use?


I do use flycheck. I've moved back to cider 0.17 for now, though, because 0.18 is still snapshot & has been undergoing rapid change as bbatsov et al do a bunch of fixes & improvements. cider-default-connection became something else, I forget what though.


@eggsyntax how did you rollback? I assume you're not using package.el ?


there's a way to pin to melpa-stable which will give you 0.17

Garrett Hopper15:07:10

Hmm, so I have cider-default-cljs-repl set via .dir-locals.el, and I can verify that it's set to what I'm expecting, but inside cider--update-cljs-type, cider-default-cljs-repl is nil. Any ideas?


@mgrbyte I'm using spacemacs, I can give you the incantation for that if you are as well.


ah yeah, I used to have that, but found it got really annoying to ping-pong between updating my lein profiles when wanting to upgrade


@eggsyntax nah, it's cool. Using stock GNU emacs 26, have done the pinning thing before so I guess I'll just re-instate it for now

metal 1

@eggsyntax thanks v. much btw :thumbsup:


Anytime 🙂


@eggsyntax happen to know what version stanza I need for cider-nrepl? I have currently have the following :repl profile:

:repl {:dependencies
        [[acyclic/squiggly-clojure "0.1.9-SNAPSHOT"
          :exclusions [org.clojure/tools.reader]]
         [compliment "0.3.5"]]
        :plugins [[cider/cider-nrepl "0.17.0"]
                  [refactor-nrepl "2.3.1"
                   :exclusions [org.clojure/tools.nrepl]]]}


Getting the y'old version mismatch malarky


stanza? I'm not familiar with that, I'm afraid. Hmm, let me check what's in my .spacemacs for config.


Very early in my init (early enough that it runs before packages are loaded) I've got

(add-to-list 'configuration-layer-elpa-archives '("melpa-stable" . ""))
  (add-to-list 'package-pinned-packages '(cider   . "melpa-stable") t)


I think that's it for pinning etc


stanza: as in "piece of code" in ~/.lein/profiles.clj in my case


I'm not specifying a CIDER version since melpa-stable will give me whatever the last non-snapshot is (currently 17)


Ah, lemme check that


I've got [cider/cider-nrepl "0.17.0"] as well.


I imagine you might need to delete your ~/.m2 repo, or at least the cider-nrepl subdir.


(& a restart of course)


hmm :thinking_face: I'll try byte-recompiling everything again. ty.

👍 1

> @bozhidar You’re removing C-c M-j? 😧 (edited) @ghopper Yes, but not soon. First we’ll remove all mentions of it from all the docs and we’ll remove it in a few releases. It’s going to be C-c C-x (C-)j going forward and all the related commands are there.


As for custom ClojureScript REPLs everything one needs to know is documented here.

Garrett Hopper16:07:56

I've already switched over to C-c C-x C-j C-[jJ] 🙂 I kinda like it. Thanks; I think I've got my .dir-locals.el setup properly now.

((nil . ((cider-clojure-cli-global-options . "-A:cljs:emacs")
         (eval . (with-eval-after-load "cider"
                    'example-repl "(start-example-repl)"
There does seem to be some issue with cider-default-cljs-repl not working as expected in there though, but I ended up not needing it, because I've got two different cljs repls, so being able to choose is good.


What kind of issues?

Garrett Hopper19:07:15

@bozhidar cider-default-cljs-repl is nil inside of cider--update-cljs-type when it's set via .dir-locals.el, so I end up getting the select type popup.

Garrett Hopper19:07:25

Is there a way to rename the sesman sessions to override the example#2 names they're given by default?


trying to jack in to a shadow-cljs project and this is what occurs

error in process filter: lispy-cider-load-file: Symbol’s function definition is void: cider-map-repls
error in process filter: Symbol’s function definition is void: cider-map-repls


are you on version 0.17 and using lispy?


ah, I'm using evil-lispy


sounds like evil lispy updated for 0.18 then


can you pin evil lispy to melpa stable?


ah, will do that


Error (use-package): Failed to install evil-lispy: Package ‘evil-lispy-’ is unavailable
Error (use-package): Cannot load evil-lispy


after pinning, this happens when I try to install


there doesn't seem to be a stable one


for evil-lispy at least


ah, so I pinned lispy and it seemed to work


that or me removing evil-lispy and having it re-installed


ugh, melpa is a mess lol