Fork me on GitHub
#cider
<
2018-07-20
>
bozhidar07:07:35

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

👍 1
bozhidar07:07:47

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.

bozhidar07:07:33

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? 😧

dpsutton14:07:20

cider-default-cljs-repl i think @ghopper

dpsutton14:07:35

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

dpsutton14:07:45

(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?

dpsutton14:07:16

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)

dpsutton14:07:04

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

dpsutton14:07:44

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.

dpsutton14:07:31

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

dpsutton14:07:42

cider-check-node-requirements is an example

dpsutton14:07:40

and you're syntax looks right to me

dpsutton14:07:09

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.

dpsutton14:07:14

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.

mgrbyte15:07:41

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 https://github.com/clojure-emacs/squiggly-clojure/issues/54

mgrbyte15:07:49

if not, what do you use?

eggsyntax15:07:31

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.

mgrbyte15:07:22

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

dpsutton15:07:04

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?

eggsyntax15:07:50

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

mgrbyte15:07:54

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

mgrbyte15:07:41

@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
mgrbyte15:07:51

@eggsyntax thanks v. much btw :thumbsup:

eggsyntax15:07:09

Anytime 🙂

mgrbyte15:07:52

@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]]]}

mgrbyte15:07:29

Getting the y'old version mismatch malarky

eggsyntax15:07:51

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

eggsyntax15:07:48

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)

eggsyntax15:07:54

I think that's it for pinning etc

mgrbyte15:07:20

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

eggsyntax15:07:21

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

eggsyntax15:07:37

Ah, lemme check that

eggsyntax15:07:47

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

eggsyntax15:07:16

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

eggsyntax15:07:22

(& a restart of course)

mgrbyte15:07:28

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

👍 1
bozhidar16:07:36

> @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.

bozhidar16:07:06

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"
                   (cider-register-cljs-repl-type
                    'example-repl "(start-example-repl)"
                    'cider-verify-piggieback-is-present))))))
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.

bozhidar17:07:49

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?

theeternalpulse19:07:53

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

dpsutton20:07:26

are you on version 0.17 and using lispy?

theeternalpulse20:07:31

ah, I'm using evil-lispy

dpsutton20:07:53

sounds like evil lispy updated for 0.18 then

dpsutton20:07:00

can you pin evil lispy to melpa stable?

theeternalpulse21:07:12

ah, will do that

theeternalpulse21:07:58

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

theeternalpulse21:07:07

after pinning, this happens when I try to install

theeternalpulse21:07:55

there doesn't seem to be a stable one

theeternalpulse21:07:03

for evil-lispy at least

theeternalpulse21:07:54

ah, so I pinned lispy and it seemed to work

theeternalpulse21:07:01

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

theeternalpulse21:07:06

ugh, melpa is a mess lol