Change auto-format for lisp files
This commit is contained in:
16
init.el
16
init.el
@ -734,9 +734,7 @@ With NO-EWW, don't update eww's state."
|
|||||||
(evil-cleverparens-mode . paredit-mode))
|
(evil-cleverparens-mode . paredit-mode))
|
||||||
:bind (:map paredit-mode-map
|
:bind (:map paredit-mode-map
|
||||||
("C-<return>" . paredit-RET)
|
("C-<return>" . paredit-RET)
|
||||||
("C-RET" . paredit-RET)
|
("C-RET" . paredit-RET))
|
||||||
:map evil-cleverparens-mode-map
|
|
||||||
("C-c o" . evil-cp-open-below-form))
|
|
||||||
:custom
|
:custom
|
||||||
(evil-cleverparens-use-s-and-S nil)
|
(evil-cleverparens-use-s-and-S nil)
|
||||||
(evil-cleverparens-complete-parens-in-yanked-region t)
|
(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
|
(advice-add 'calculate-lisp-indent :around
|
||||||
'my/-calculate-lisp-indent-noindent-comment)
|
'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
|
;; sly
|
||||||
(use-package sly
|
(use-package sly
|
||||||
;; :hook (lisp-mode . my/-lisp-mode-autoconnect-sly)
|
;; :hook (lisp-mode . my/-lisp-mode-autoconnect-sly)
|
||||||
|
|||||||
Reference in New Issue
Block a user