Only restart LSP after successful formatting in python buffer
This commit is contained in:
parent
ec1fe76304
commit
c07a0f2e26
@ -4793,10 +4793,10 @@ A package that bundles together common code beautifying tools for many languages
|
||||
(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 lsp-mode
|
||||
(lsp-restart-workspace))))))
|
||||
(add-hook 'format-all-after-format-functions
|
||||
(lambda (formatter status)
|
||||
(when (and (eq status :reformatted) python-mode lsp-mode)
|
||||
(lsp-restart-workspace))))))
|
||||
#+END_SRC
|
||||
|
||||
* Compiling
|
||||
|
Loading…
Reference in New Issue
Block a user