Merge pull request #4425 from samwhitlock/develop

A workaround for formatting org mode
This commit is contained in:
Henrik Lissner 2020-12-14 02:30:44 -05:00 committed by GitHub
commit 39d6caf090
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -225,9 +225,9 @@ If nil, BEG and/or END will default to the boundaries of the src block at point.
(defun +format/buffer ()
"Reformat the current buffer using LSP or `format-all-buffer'."
(interactive)
(if (and (eq major-mode 'org-mode)
(org-in-src-block-p t))
(+format--org-region nil nil)
(if (eq major-mode 'org-mode)
(when (org-in-src-block-p t)
(+format--org-region nil nil))
(call-interactively
(cond ((and +format-with-lsp
(bound-and-true-p lsp-mode)