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)
|
(leader-def-key "cf" 'format-all-buffer)
|
||||||
:config
|
:config
|
||||||
(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 lsp-mode
|
(when (and (eq status :reformatted) python-mode lsp-mode)
|
||||||
(lsp-restart-workspace))))))
|
(lsp-restart-workspace))))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Compiling
|
* Compiling
|
||||||
|
Loading…
Reference in New Issue
Block a user