Only restart LSP after successful formatting in python buffer

This commit is contained in:
Jeremy Dormitzer 2020-01-31 13:40:33 -05:00
parent ec1fe76304
commit c07a0f2e26

View File

@ -4795,7 +4795,7 @@ A package that bundles together common code beautifying tools for many languages
(with-eval-after-load 'lsp-mode
(add-hook 'format-all-after-format-functions
(lambda (formatter status)
(when lsp-mode
(when (and (eq status :reformatted) python-mode lsp-mode)
(lsp-restart-workspace))))))
#+END_SRC