Fork me on GitHub
#cider
<
2016-01-29
>
rickmoynihan14:01:03

When I open a new file called foo_test.clj cider inserts a template namespace at the top - is there anyway to customise that?

slipset14:01:18

@cichli @bozhidar just remembered inf-clojure, which works smoothly enough with Planck simple_smile

slipset15:01:48

@bozhidar: any particular reason you’ve bound eval-last-sexp to C-c C-e in inf-clojure, when it’s C-x C-e in Cider?

malabarba15:01:44

@rickmoynihan that's not cider, it's clj-refactor

rickmoynihan15:01:03

malabarba: thanks simple_smile

rickmoynihan16:01:07

@benedek: but no way to customize the template without using something else...

benedek16:01:53

hm… let me check

rickmoynihan16:01:37

seems to use cljr--add-test-use-declarations

benedek16:01:16

i guess this is using a clojure mode feature

benedek16:01:27

(clojure-insert-ns-form)

bozhidar16:01:29

@slipset: I thought I had bound both keybindings to the same commands

bozhidar16:01:32

in both tools

bozhidar16:01:38

I might be mistaken though

bozhidar16:01:55

one is the traditional GNU keybinding and the other one was inherited from SLIME

benedek16:01:52

ignore previous (which is true but does not really matter)

benedek16:01:20

unfortunately it does not seem to be template based

benedek16:01:15

so you are right 😕

benedek16:01:48

a yasnippet based solution would be pretty nice here i guess

benedek16:01:13

feel free to create a ticket about it

benedek16:01:37

would be a nice feature really. perhaps even @bozhidar would be interested in cider

malabarba17:01:36

Emacs has a mode for this @benedek @slipset .it's called auto-insert-mode. Perhaps clojure-mode should use that. It has some template stuff, so we wouldn't reinvent the wheel.

benedek19:01:27

I am thinking you surely can use a yasnippet template you only need to autorun it when a clj/s/c file is opened

bozhidar22:01:46

what exactly would you want to customize in this declaration?