summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-04-03 09:45:24 -0500
committerCase Duckworth2021-04-03 09:45:24 -0500
commitd89223f00dbdaac2f21fd33392eea78f47d2a5fe (patch)
treeaf240ac9df81f125d5026e213ca2750b0025a9a5
parentFix typo (diff)
downloademacs-d89223f00dbdaac2f21fd33392eea78f47d2a5fe.tar.gz
emacs-d89223f00dbdaac2f21fd33392eea78f47d2a5fe.zip
Add paredit-mode
I also disabled electric-pair-mode in paredit-mode enabled buffers.
-rw-r--r--init.el21
1 files changed, 16 insertions, 5 deletions
diff --git a/init.el b/init.el index 62e16c7..4255e10 100644 --- a/init.el +++ b/init.el
@@ -228,11 +228,6 @@
228(setup imenu 228(setup imenu
229 (:option imenu-auto-rescan t)) 229 (:option imenu-auto-rescan t))
230 230
231;;;;; Setup `electric-pair-mode' in the minibuffer only with `eval-expression'
232(add-hook 'minibuffer-setup-hook (defun hook--electric-pair-minibuffer ()
233 (when (eq this-command 'eval-expression)
234 (electric-pair-mode +1)
235 (show-paren-mode +1))))
236;;;; Cursor 231;;;; Cursor
237(setc cursor-type 'bar 232(setc cursor-type 'bar
238 cursor-in-non-selected-windows 'hollow) 233 cursor-in-non-selected-windows 'hollow)
@@ -786,6 +781,22 @@ if ripgrep is installed, otherwise `consult-grep'."
786(setup eldoc 781(setup eldoc
787 (:option eldoc-idle-delay 0.1 782 (:option eldoc-idle-delay 0.1
788 eldoc-echo-area-use-multiline-p nil)) 783 eldoc-echo-area-use-multiline-p nil))
784
785;;;;; Paredit mode
786(setup (:straight paredit)
787 (autoload 'enable-paredit-mode "paredit" nil t)
788 (dolist (hook '(emacs-lisp-mode-hook
789 eval-expression-minibuffer-setup-hook
790 ielm-mode-hook
791 lisp-mode-hook
792 lisp-interaction-mode-hook
793 scheme-mode-hook))
794 (add-hook hook #'enable-paredit-mode))
795 (:hook (defun hook--paredit-disable-electric-pair ()
796 (electric-pair-local-mode -1)))
797 (require 'eldoc)
798 (eldoc-add-command 'paredit-backward-delete 'paredit-close-round))
799
789;;;;; Emacs lisp 800;;;;; Emacs lisp
790(setup elisp-mode 801(setup elisp-mode
791 (:option eval-expression-print-length nil 802 (:option eval-expression-print-length nil