Remove lsp-restart in format-all-after hook

This commit is contained in:
Jeremy Dormitzer 2020-02-25 13:29:09 -05:00
parent eb1affbc13
commit 2f01a82bd5

View File

@ -5398,15 +5398,7 @@ A package that bundles together common code beautifying tools for many languages
(use-package format-all (use-package format-all
:commands (format-all-buffer) :commands (format-all-buffer)
:init :init
(leader-def-key "cf" 'format-all-buffer) (leader-def-key "cf" 'format-all-buffer))
:config
(with-eval-after-load 'lsp-mode
(add-hook 'format-all-after-format-functions
(lambda (formatter status)
(when (and (eq status :reformatted)
(equal major-mode 'python-mode)
(boundp 'lsp-mode) lsp-mode)
(lsp-restart-workspace))))))
#+END_SRC #+END_SRC
* Compiling * Compiling