Fork me on GitHub
#clojure-nl
<
2020-01-13
>
Mno08:01:30

Mooornin'

thomas10:01:31

sorry can't help you there.

bbss12:01:48

@kevin.van.rooijen I'm using lispy a bit now, but when I write (fn []) the [ triggers lispy-backwards so it's impossible to write [] . Do I need to activate some specific clojure mode?

kwrooijen12:01:59

I use this:

(evil-define-key 'insert lispy-mode-map
  "[" #'lispy-brackets-or-barf)

(evil-define-key 'insert lispy-mode-map
  "]" #'lispy-slurp)

kwrooijen12:01:03

This might solve your issue?

kwrooijen12:01:20

But then [ and ] become barf / slurp

bbss12:01:29

Thanks, I don't use evil though..

kwrooijen12:01:57

Then it’s just a regular define key

kwrooijen12:01:07

for lispy-mode-map

kwrooijen12:01:01

I believe something like this?

(define-key lispy-mode-map "[" 'lispy-brackets-or-barf)
(define-key lispy-mode-map "]" 'lispy-slurp)

bbss12:01:26

hmm, that gives me Wrong type argument: commandp, lispy-brackets-or-barf when I try to use it.

bbss12:01:48

I must be missing something, lispy has done a lot of work to be compatible with clojure, but the behaviour I'm seeing would make it unusable..

kwrooijen12:01:25

Maybe you need to add # before 'lispy-brackets-or-barf

bbss12:01:55

Hmm, that seems to do the same.

bbss12:01:09

Oh well, I'll research a bit more. Thanks for your help anyway.

kwrooijen12:01:24

Strange, I’m not sure what the issue is. Another option might be: (lispy-define-key lispy-mode-map "]" 'lispy-slurp)

kwrooijen12:01:45

If that doesn’t work, then I might be out of tricks 🤷

bbss12:01:59

Okay, I'll give it a go, thanks!

bbss12:01:45

That seems to work! Great 🙂