about summary refs log tree commit diff
path: root/users/sterni
diff options
context:
space:
mode:
Diffstat (limited to 'users/sterni')
-rw-r--r--users/sterni/emacs/default.nix1
-rw-r--r--users/sterni/emacs/init.el16
2 files changed, 15 insertions, 2 deletions
diff --git a/users/sterni/emacs/default.nix b/users/sterni/emacs/default.nix
index 606fcb14e09e..0a03c15586cf 100644
--- a/users/sterni/emacs/default.nix
+++ b/users/sterni/emacs/default.nix
@@ -25,6 +25,7 @@ let
     epkgs.urweb-mode
     # misc
     epkgs.melpaPackages.hl-todo
+    epkgs.melpaPackages.paredit
     epkgs.elpaPackages.rainbow-mode
     epkgs.melpaPackages.rainbow-delimiters
     # beyond text editing
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))