about summary refs log tree commit diff
path: root/users/sterni/emacs/init.el
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2022-01-16T23·32+0100
committerclbot <clbot@tvl.fyi>2022-01-17T12·19+0000
commitf3cc32bef8a06c0616d4d0cc182a400b16a21876 (patch)
treeaa3f97595d70a429b6fd1e0956347a641fbb7b36 /users/sterni/emacs/init.el
parent24881e39c9259d5dbd1d585011e47d4791579a12 (diff)
feat(users/sterni/emacs): enable paredit r/3607
Change-Id: I318ccf75fa470f442c05df6ae6f8df8772a7c1d6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4951
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'users/sterni/emacs/init.el')
-rw-r--r--users/sterni/emacs/init.el16
1 files changed, 14 insertions, 2 deletions
diff --git a/users/sterni/emacs/init.el b/users/sterni/emacs/init.el
index f96848e4c8a0..21b87bc24f4d 100644
--- a/users/sterni/emacs/init.el
+++ b/users/sterni/emacs/init.el
@@ -143,8 +143,18 @@
   :config
   (evil-collection-init))
 
+;; parens
 (use-package rainbow-delimiters
-  :hook (prog-mode . rainbow-delimiters-mode))
+  :hook ((prog-mode . rainbow-delimiters-mode)))
+
+(setq show-paren-delay 0)
+(show-paren-mode)
+
+(use-package paredit
+  :hook ((emacs-lisp-mode . paredit-mode)
+         (lisp-mode . paredit-mode)
+         (ielm-mode . paredit-mode)
+         (lisp-interaction-mode . paredit-mode)))
 
 (use-package nix-mode :mode "\\.nix\\'")
 (use-package nix-drv-mode :mode "\\.drv\\'")
@@ -161,7 +171,9 @@
 (use-package rust-mode)
 (use-package sly
   :after evil
-  :hook ((sly-mrepl-mode . (lambda () (rainbow-delimiters-mode-enable))))
+  :hook ((sly-mrepl-mode . (lambda ()
+                             (enable-paredit-mode)
+                             (rainbow-delimiters-mode-enable))))
   :config
   (evil-define-key '(normal insert) sly-mrepl-mode-map (kbd "C-r") 'isearch-backward))