mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-06 15:13:33 -05:00
refactor(format): introduce +format-functions
This commit is contained in:
@@ -27,6 +27,17 @@ This has no effect on the +onsave flag, apheleia will always be used there.")
|
||||
(defvaralias '+format-with 'apheleia-formatter
|
||||
"Set this to explicitly use a certain formatter for the current buffer.")
|
||||
|
||||
(defvar +format-functions
|
||||
'(+format-in-org-src-blocks-fn
|
||||
+format-with-lsp-fn)
|
||||
"A list of functions to run when formatting a buffer or region.
|
||||
|
||||
Each function is given three arguments: the starting point, end point, and a
|
||||
symbol indicating the type of operation being requested (as a symbol: either
|
||||
`region' or `buffer').
|
||||
|
||||
The first function to return non-nil will abort all functions after it,
|
||||
including Apheleia itself.")
|
||||
|
||||
;;
|
||||
;;; Bootstrap
|
||||
|
Reference in New Issue
Block a user