editor/lispyville: Add lispy

smartparens being disabled in lispyville-mode, typing ( in
insert state would not pair the paren
This commit is contained in:
Quentin Le Guennec 2018-11-01 11:53:42 +01:00
parent 876660c28f
commit faf5eea115
4 changed files with 35 additions and 26 deletions

View file

@ -0,0 +1,36 @@
#+TITLE: :editor lispy
This modules adds [[https://github.com/noctuid/lispyville][lispy]] key functionality in Lisp languages.
This includes:
- Common Lisp
- Emacs Lisp
- Scheme
- Racket
- [[http://docs.hylang.org/en/stable/][Hy]]
- [[http://lfe.io/][LFE]]
- Clojure
If evil is enabled, lispyville would also be activated for every mode where
lispy is active
The default key themes that are set are as follows:
#+BEGIN_SRC emacs-lisp
(lispyville-set-key-theme
'((operators normal)
c-w
(prettify insert)
(atom-movement normal visual)
slurp/barf-lispy
(wrap normal insert)
additional
additional-insert
(additional-wrap normal insert)
(escape insert)))
#+END_SRC
See noctuid's [[https://github.com/noctuid/lispyville/blob/master/README.org][README]] for more info on specific keybindings (starting [[https://github.com/noctuid/lispyville#operators-key-theme][here]]) of
each key theme. Think of ~lispyville-set-key-theme~ as adding
~parinfer-extensions~ via ~(setq parinfer-extensions '(blah blah blah))~.

View file

@ -0,0 +1,28 @@
;;; editor/lispy/config.el -*- lexical-binding: t; -*-
(def-package! lispy
:hook ((common-lisp-mode . lispy-mode)
(emacs-lisp-mode . lispy-mode)
(scheme-mode . lispy-mode)
(racket-mode . lispy-mode)
(hy-mode . lispy-mode)
(lfe-mode . lispy-mode)
(clojure-mode . lispy-mode))
:config
(add-hook 'lispy-mode-hook #'turn-off-smartparens-mode))
(def-package! lispyville
:when (featurep! :feature evil)
:hook (lispy-mode . lispyville-mode)
:config
(lispyville-set-key-theme
'((operators normal)
c-w
(prettify insert)
(atom-movement normal visual)
slurp/barf-lispy
(wrap normal insert)
additional
additional-insert
(additional-wrap normal insert)
(escape insert))))

View file

@ -0,0 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; editor/lispyville/packages.el
(package! lispy)
(when (featurep! :feature evil)
(package! lispyville))