Change auto-format for lisp files

This commit is contained in:
2025-11-02 01:42:50 -07:00
parent 64d229236f
commit 8191a92a8c

16
init.el
View File

@ -734,9 +734,7 @@ With NO-EWW, don't update eww's state."
(evil-cleverparens-mode . paredit-mode))
:bind (:map paredit-mode-map
("C-<return>" . paredit-RET)
("C-RET" . paredit-RET)
:map evil-cleverparens-mode-map
("C-c o" . evil-cp-open-below-form))
("C-RET" . paredit-RET))
:custom
(evil-cleverparens-use-s-and-S nil)
(evil-cleverparens-complete-parens-in-yanked-region t)
@ -2184,6 +2182,18 @@ line in the block and manually deal with indentation."
(advice-add 'calculate-lisp-indent :around
'my/-calculate-lisp-indent-noindent-comment)
;; common lisp
(use-package lisp-mode
:ensure nil
:hook (lisp-mode . my/-format-only-when-sly-running)
:init
(defun my/-apheleia-sly-skip-function ()
(or (not (featurep 'sly))
(not sly-mode)
(not (sly-connected-p))))
(defun my/-format-only-when-sly-running ()
"Make apheleia-mode format lisp buffers only when sly is running."
(add-to-list 'apheleia-skip-functions #'my/-apheleia-sly-skip-function)))
;; sly
(use-package sly
;; :hook (lisp-mode . my/-lisp-mode-autoconnect-sly)