Switch out paredit for smartparens
This commit is contained in:
parent
1a055f60ef
commit
b97b931588
@ -999,27 +999,23 @@ Store backups and autosaves in a centralized place. This should really be the de
|
||||
(setq backup-directory-alist '(("." . "~/.emacs.d/backups")))
|
||||
#+END_SRC
|
||||
|
||||
* Paredit/Parinfer
|
||||
Paredit enables structured editing of s-expressions
|
||||
* Smartparens/Parinfer
|
||||
Smartparens enables structured editing of s-expressions and other pairs:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package paredit
|
||||
:hook ((emacs-lisp-mode . enable-paredit-mode)
|
||||
(lisp-mode . enable-paredit-mode)
|
||||
(clojure-mode . enable-paredit-mode)
|
||||
(cider-repl-mode . enable-paredit-mode)
|
||||
(ielm-mode . enable-paredit-mode)
|
||||
(scheme-mode . enable-paredit-mode)
|
||||
(geiser-repl-mode . enable-paredit-mode)
|
||||
(slime-repl-mode . enable-paredit-mode)))
|
||||
(use-package smartparens
|
||||
:hook ((prog-mode . smartparens-strict-mode)))
|
||||
|
||||
(use-package evil-smartparens
|
||||
:after (evil smartparens)
|
||||
:hook ((smartparens-enabled . evil-smartparens-mode)))
|
||||
|
||||
(jdormit/define-prefix "l" "lisp")
|
||||
(jdormit/define-prefix "lw" "wrap")
|
||||
(leader-def-key "lwr" 'paredit-wrap-round)
|
||||
(leader-def-key "lws" 'paredit-wrap-square)
|
||||
(leader-def-key "lwc" 'paredit-wrap-curly)
|
||||
(leader-def-key "ls" 'paredit-forward-slurp-sexp)
|
||||
(leader-def-key "lb" 'paredit-forward-barf-sexp)
|
||||
(leader-def-key "lwr" 'sp-wrap-round)
|
||||
(leader-def-key "lws" 'sp-wrap-square)
|
||||
(leader-def-key "lwc" 'sp-wrap-curly)
|
||||
(leader-def-key "ls" 'sp-forward-slurp-sexp)
|
||||
(leader-def-key "lb" 'sp-forward-barf-sexp)
|
||||
#+END_SRC
|
||||
|
||||
Parinfer infers parens from indentation and vice-versa:
|
||||
@ -1030,7 +1026,6 @@ Parinfer infers parens from indentation and vice-versa:
|
||||
(setq parinfer-extensions '(defaults
|
||||
pretty-parens
|
||||
evil
|
||||
paredit
|
||||
smart-tab
|
||||
smart-yank))
|
||||
:hook ((clojure-mode . parinfer-mode)
|
||||
|
Loading…
Reference in New Issue
Block a user