feat(users/sterni/emacs): enable paredit

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>
This commit is contained in:
sterni 2022-01-17 00:32:11 +01:00 committed by clbot
parent 24881e39c9
commit f3cc32bef8
2 changed files with 15 additions and 2 deletions

View file

@ -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

View file

@ -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))