Add +format-with-lsp variable

To control whether or not to use LSP code formatter when it is
available.
This commit is contained in:
Henrik Lissner 2020-05-21 01:20:00 -04:00
parent 885197bd06
commit 090a68ab8f
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 10 additions and 2 deletions

View file

@ -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