mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
editor/reformat: refactor & fixes
+ Change +format-type to +format-region-p (now a boolean) + Add PRESERVE-INDENT-P boolean argument to +format-buffer + Add +format-preserve-indentation variable (only controls indent preservation during +format/buffer, not +format/region, where it's always enabled). + Fix error arising from +format|buffer hook when no formatter is defined for the current mode #893 + Change +format|buffer to alias for +format/buffer.
This commit is contained in:
@ -12,6 +12,12 @@ If nil, it is disabled in all modes, the same as if the +onsave flag wasn't
|
||||
|
||||
Irrelevant if you do not have the +onsave flag enabled for this module.")
|
||||
|
||||
(defvar +format-preserve-indentation t
|
||||
"If non-nil, the leading indentation is preserved when formatting the whole
|
||||
buffer. This is particularly useful for partials.
|
||||
|
||||
Indentation is always preserved when formatting regions. ")
|
||||
|
||||
(defvar-local +format-with nil
|
||||
"Set this to explicitly use a certain formatter for the current buffer.")
|
||||
|
||||
|
Reference in New Issue
Block a user