Fix the after-format-function hook to restart lsp

This commit is contained in:
Jeremy Dormitzer 2020-02-05 15:47:30 -05:00
parent 886a65f328
commit 89ecc67735

View File

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