Fork me on GitHub
#spacemacs
<
2018-09-18
>
kirill.salykin13:09:28

hey, anyone who uses lispy/lispyville here?

kirill.salykin13:09:54

I am trying to enable lispy-pair and lispy-quote https://github.com/noctuid/lispyville#relationship-with-lispy but no luck so far, please advice

jeff.terrell13:09:26

I haven't tried using them, sorry.

practicalli-johnny14:09:46

@kirill.salykin as lispy does what Spacemacs Evil mode and clever-parens already does, you make have to make significant changes to Spacemacs. You should probably create your own clojure layer too. I could be wrong, but it sounds like a big task. I suggest discussing this kind of change in the Spacemacs gitter channel with the project maintainers to get a sense of whats involved.

kirill.salykin14:09:31

I don’t want all lispy, just lispy-pair and lispy-quote

practicalli-johnny14:09:11

Sorry, I dont know what those two functions do and they dont seem to be in the lispyville.el file.

kirill.salykin14:09:03

I think they are part of lispy… as lispyville says - you should bind it yourself, but I have no idea how…

practicalli-johnny15:09:17

are you just asking how to do a keybinding for a function?

kirill.salykin15:09:09

what I want is to run lispy-pair in insert mode on (

kirill.salykin15:09:16

basically thats it

kirill.salykin15:09:01

and lispy-quote in insert mode whtn " pressed

practicalli-johnny15:09:29

https://github.com/abo-abo/lispy/blob/master/lispy.el#L9031 onwards has lots of examples of defining a keybinding in lispy. You could add the bindings to your own local copy of lispy and load that

kirill.salykin15:09:45

thanks! will have a look

practicalli-johnny15:09:14

or you can add to the dotspacemacs/user-config section of .spacemacs as in the following examples https://gist.github.com/jr0cket/01e2a8a9bf85d28d5782820e8e2891a3#file-spacemacs-el-L494

kirill.salykin15:09:57

this was my idea

practicalli-johnny15:09:43

if needed, you can also add your own functions there, in case you needed a wrapper function or copy something across from lispy https://gist.github.com/jr0cket/01e2a8a9bf85d28d5782820e8e2891a3#file-spacemacs-el-L723

kirill.salykin15:09:31

(evil-define-key 'insert 'global "(" 'lispy-parens)
  (evil-define-key 'insert 'global "[" 'lispy-brackets)
  (evil-define-key 'insert 'global "{" 'lispy-braces)
  (evil-define-key 'normal 'global "\"" 'lispy-quotes)
  (evil-define-key 'visual 'global "\"" 'lispy-quotes)
  (evil-define-key 'insert 'global "\"" 'lispy-quotes)

👍 12
kirill.salykin15:09:35

this worked for me