Fork me on GitHub
#cider
<
2018-03-30
>
richiardiandrea00:03:29

I am trying to setq clojure-refactor-map-prefix but it seems like no keybinding works

richiardiandrea00:03:51

is this usually the right way? (setq clojure-refactor-map-prefix "C-c M-f")

didibus00:03:25

Not sure, I'm guessing you probably want something like this

(eval-after-load "clojure-mode"
    '(progn
       ;; Make TAB use auto-complete company for nicer auto-completion in clojure mode
       (define-key clojure-mode-map (kbd "TAB") #'company-indent-or-complete-common)
       ;; Make C-RET eval the last-sexprs for nicer eval when in clojure mode connected to CIDER repl
       (define-key clojure-mode-map (kbd "C-<return>") #'cider-eval-last-sexp)))

didibus00:03:52

Depends what clojure-refactor-map-prefix is

richiardiandrea00:03:02

it is a defcustom

didibus00:03:39

Ya, so then what you have should work

richiardiandrea00:03:22

yep true, weird...

didibus00:03:59

You could try and add it inside of a eval-after-load

richiardiandrea00:03:25

trying 😄

didibus00:03:39

If you go in sratch, and you type clojure-refactor-map-prefix and then run C-x C-e, what is printed in the echo area?

richiardiandrea00:03:12

it prints the correct one

richiardiandrea00:03:44

but then the key combination does not work in the buffer, saying that it is undefined

didibus00:03:31

Hum, weird. Did you try setting it before clojure-mode loads too? Might depend when clojure-mode registers the keybinding from that var

richiardiandrea00:03:58

right it might be that

richiardiandrea00:03:00

too bad that C-c C-r clashes with inf-clojure-eval-region

richiardiandrea00:03:32

trying to disable that key binding actually but it gets added somehow

richiardiandrea01:03:44

I remember long long time ago there was a way to generate function stub of a protocol, is it still there?

bozhidar02:03:32

There was just a ticket about this, but nothing concrete came out in CIDER. Maybe something in clj-refactor.el? //cc @benedek

bozhidar02:03:16

@richiardiandrea Btw, in the morning I remembered that it was cider-ns-form, not clojure-ns-form. Anyways, I can always move this to clojure-mode indeed.

richiardiandrea03:03:07

Ok I will check that, I am still undecided on that, I don't know if it is actually necessary for my workflow, will open an issue in case ok?

bozhidar02:03:55

In cider-util.el we’ve got a boatload of functions that I assume are going to be useful for any clojure-mode user, especially tools like inf-clojure. You might want to check this file out.

richiardiandrea03:03:32

Ok thanks I will!

benedek09:03:30

there is a generate stubs for protocol in cljr

benedek09:03:46

also generate fn from example

simonkatz13:03:16

Is there a way in CIDER (or elsewhere) to nicely see a list of all the methods for a multimethod and allow me navigate to their definitions? There's clojure.core/methods which is a start, but I'm hoping for something more.

bozhidar14:03:56

We don’t have such a functionality, but I assume it wouldn’t be hard to implement this.

bozhidar14:03:15

I guess you can file a feature request ticket and we’ll take a look at some point.