From faf5eea115b7beb77847fe34c3123713c42729bb Mon Sep 17 00:00:00 2001 From: Quentin Le Guennec Date: Thu, 1 Nov 2018 11:53:42 +0100 Subject: [PATCH] editor/lispyville: Add lispy smartparens being disabled in lispyville-mode, typing ( in insert state would not pair the paren --- .../editor/{lispyville => lispy}/README.org | 7 +++-- modules/editor/lispy/config.el | 28 +++++++++++++++++++ .../editor/{lispyville => lispy}/packages.el | 2 ++ modules/editor/lispyville/config.el | 24 ---------------- 4 files changed, 35 insertions(+), 26 deletions(-) rename modules/editor/{lispyville => lispy}/README.org (85%) create mode 100644 modules/editor/lispy/config.el rename modules/editor/{lispyville => lispy}/packages.el (87%) delete mode 100644 modules/editor/lispyville/config.el diff --git a/modules/editor/lispyville/README.org b/modules/editor/lispy/README.org similarity index 85% rename from modules/editor/lispyville/README.org rename to modules/editor/lispy/README.org index 84c5f9d95..a7d428860 100644 --- a/modules/editor/lispyville/README.org +++ b/modules/editor/lispy/README.org @@ -1,6 +1,6 @@ -#+TITLE: :editor lispyville +#+TITLE: :editor lispy -This modules adds [[https://github.com/noctuid/lispyville][lispyville]] key functionality in Lisp languages. +This modules adds [[https://github.com/noctuid/lispyville][lispy]] key functionality in Lisp languages. This includes: @@ -12,6 +12,9 @@ This includes: - [[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 diff --git a/modules/editor/lispy/config.el b/modules/editor/lispy/config.el new file mode 100644 index 000000000..4a5db3373 --- /dev/null +++ b/modules/editor/lispy/config.el @@ -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)))) diff --git a/modules/editor/lispyville/packages.el b/modules/editor/lispy/packages.el similarity index 87% rename from modules/editor/lispyville/packages.el rename to modules/editor/lispy/packages.el index de5773587..953527d27 100644 --- a/modules/editor/lispyville/packages.el +++ b/modules/editor/lispy/packages.el @@ -1,5 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/lispyville/packages.el +(package! lispy) + (when (featurep! :feature evil) (package! lispyville)) diff --git a/modules/editor/lispyville/config.el b/modules/editor/lispyville/config.el deleted file mode 100644 index b88994438..000000000 --- a/modules/editor/lispyville/config.el +++ /dev/null @@ -1,24 +0,0 @@ -;;; editor/lispyville/config.el -*- lexical-binding: t; -*- - -(def-package! lispyville - :when (featurep! :feature evil) - :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 - (prettify insert) - (atom-movement normal visual) - slurp/barf-lispy - (wrap normal insert) - additional - additional-insert - (additional-wrap normal insert) - (escape insert))))