Allow adjust-parens to be used from normal state too

This commit is contained in:
Alexander Rosenberg 2024-09-13 01:48:59 -07:00
parent 1e13252624
commit 718b24d5e9
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

16
init.el
View File

@ -319,7 +319,21 @@ Interactively, force the recompile if called with a prefix."
;; and nicer ;; and nicer
(use-package adjust-parens (use-package adjust-parens
:hook (prog-mode . adjust-parens-mode)) :hook (prog-mode . adjust-parens-mode)
:config
(defun my/normal-state-lisp-indent-adjust-parens ()
"Like `lisp-indent-adjust-parens', but got to first char on line first."
(interactive)
(back-to-indentation)
(lisp-indent-adjust-parens))
(defun my/normal-state-lisp-dedent-adjust-parens ()
"Like `lisp-dedent-adjust-parens', but got to first char on line first."
(interactive)
(back-to-indentation)
(lisp-dedent-adjust-parens))
(evil-define-key 'normal adjust-parens-mode-map
(kbd "<tab>") #'my/normal-state-lisp-indent-adjust-parens
(kbd "<backtab>") #'my/normal-state-lisp-dedent-adjust-parens))
;; for when the files are just too large ;; for when the files are just too large
(use-package vlf (use-package vlf