Fix the after-format-function hook to restart lsp
This commit is contained in:
parent
886a65f328
commit
89ecc67735
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user