diff options
author | sterni <sternenseemann@systemli.org> | 2022-01-16T23·32+0100 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-01-17T12·19+0000 |
commit | f3cc32bef8a06c0616d4d0cc182a400b16a21876 (patch) | |
tree | aa3f97595d70a429b6fd1e0956347a641fbb7b36 /users/sterni | |
parent | 24881e39c9259d5dbd1d585011e47d4791579a12 (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')
-rw-r--r-- | users/sterni/emacs/default.nix | 1 | ||||
-rw-r--r-- | users/sterni/emacs/init.el | 16 |
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)) |