mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-24 12:00:24 +10:00
Updating Doom Emacs.
This commit is contained in:
@@ -23,6 +23,12 @@ Indentation is always preserved when formatting regions.")
|
||||
(defvar-local +format-with nil
|
||||
"Set this to explicitly use a certain formatter for the current buffer.")
|
||||
|
||||
(defvar +format-with-lsp t
|
||||
"If non-nil, format with LSP formatter if it's available.
|
||||
|
||||
This can be set buffer-locally with `setq-hook!' to disable LSP formatting in
|
||||
select buffers.")
|
||||
|
||||
|
||||
;;
|
||||
;;; Bootstrap
|
||||
@@ -55,4 +61,4 @@ This is controlled by `+format-on-save-enabled-modes'."
|
||||
;; 1. Enables partial reformatting (while preserving leading indentation),
|
||||
;; 2. Applies changes via RCS patch, line by line, to protect buffer markers
|
||||
;; and avoid any jarring cursor+window scrolling.
|
||||
(advice-add #'format-all-buffer :override #'+format/buffer)
|
||||
(advice-add #'format-all-buffer--with :around #'+format-buffer-a)
|
||||
|
||||
Reference in New Issue
Block a user