From 6dc3cddf19deec85f3cd54b4464715dc15115454 Mon Sep 17 00:00:00 2001 From: The-BigDaddy Date: Sat, 27 Oct 2018 16:44:12 -0500 Subject: [PATCH 1/2] added :editor lispyville --- modules/editor/lispyville/README.org | 33 +++++++++++++++++++++++++++ modules/editor/lispyville/config.el | 25 ++++++++++++++++++++ modules/editor/lispyville/packages.el | 5 ++++ 3 files changed, 63 insertions(+) create mode 100644 modules/editor/lispyville/README.org create mode 100644 modules/editor/lispyville/config.el create mode 100644 modules/editor/lispyville/packages.el diff --git a/modules/editor/lispyville/README.org b/modules/editor/lispyville/README.org new file mode 100644 index 000000000..84c5f9d95 --- /dev/null +++ b/modules/editor/lispyville/README.org @@ -0,0 +1,33 @@ +#+TITLE: :editor lispyville + +This modules adds [[https://github.com/noctuid/lispyville][lispyville]] 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 + +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))~. diff --git a/modules/editor/lispyville/config.el b/modules/editor/lispyville/config.el new file mode 100644 index 000000000..74e448e71 --- /dev/null +++ b/modules/editor/lispyville/config.el @@ -0,0 +1,25 @@ +;;; editor/lispyville/config.el -*- lexical-binding: t; -*- + +(def-package! lispyville + :when (featurep! :feature evil) + :init + (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)) + :hook ((common-lisp-mode . lispyville-mode) + (emacs-lisp-mode . lispyville-mode) + (scheme-mode . lispyville-mode) + (racket-mode . lispyville-mode) + (hy-mode . lispyville-mode) + (lfe-mode . lispyville-mode) + (clojure-mode . lispyville-mode)) + :config + (add-hook 'lispyville-mode-hook #'turn-off-smartparens-mode))) diff --git a/modules/editor/lispyville/packages.el b/modules/editor/lispyville/packages.el new file mode 100644 index 000000000..de5773587 --- /dev/null +++ b/modules/editor/lispyville/packages.el @@ -0,0 +1,5 @@ +;; -*- no-byte-compile: t; -*- +;;; editor/lispyville/packages.el + +(when (featurep! :feature evil) + (package! lispyville)) From 00d91661e239c110b8e1498f46246868ec294606 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 31 Oct 2018 15:38:13 -0400 Subject: [PATCH 2/2] editor/lispyville: minor reformatting + Ensure lispyville is properly lazyloaded by deferring the call to lispyville-set-key-theme + Fix indentation on :hook entries --- modules/editor/lispyville/config.el | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/modules/editor/lispyville/config.el b/modules/editor/lispyville/config.el index 74e448e71..b88994438 100644 --- a/modules/editor/lispyville/config.el +++ b/modules/editor/lispyville/config.el @@ -2,7 +2,15 @@ (def-package! lispyville :when (featurep! :feature evil) - :init + :hook ((common-lisp-mode . lispyville-mode) + (emacs-lisp-mode . lispyville-mode) + (scheme-mode . lispyville-mode) + (racket-mode . lispyville-mode) + (hy-mode . lispyville-mode) + (lfe-mode . lispyville-mode) + (clojure-mode . lispyville-mode)) + :config + (add-hook 'lispyville-mode-hook #'turn-off-smartparens-mode) (lispyville-set-key-theme '((operators normal) c-w @@ -13,13 +21,4 @@ additional additional-insert (additional-wrap normal insert) - (escape insert)) - :hook ((common-lisp-mode . lispyville-mode) - (emacs-lisp-mode . lispyville-mode) - (scheme-mode . lispyville-mode) - (racket-mode . lispyville-mode) - (hy-mode . lispyville-mode) - (lfe-mode . lispyville-mode) - (clojure-mode . lispyville-mode)) - :config - (add-hook 'lispyville-mode-hook #'turn-off-smartparens-mode))) + (escape insert))))