Skip to content

Commit 7c21320

Browse files
committed
Don't set indent-region-function to nil when not needed
Fixes #2408
1 parent 7d22a49 commit 7c21320

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lsp-mode.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3747,7 +3747,8 @@ in that particular folder."
37473747
(run-hooks 'lsp-unconfigure-hook)
37483748

37493749
(lsp--remove-overlays 'lsp-color)
3750-
(setq-local indent-region-function nil)
3750+
(when (eq indent-region-function #'lsp-format-region)
3751+
(setq-local indent-region-function nil))
37513752
(remove-hook 'lsp-on-change-hook #'lsp--document-color t)
37523753
(remove-hook 'lsp-on-idle-hook #'lsp--document-highlight t)
37533754
(remove-hook 'lsp-on-idle-hook #'lsp--document-links t))

0 commit comments

Comments
 (0)