From c07a0f2e26d71458569e7df88fa88acf5937eea4 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Fri, 31 Jan 2020 13:40:33 -0500 Subject: [PATCH] Only restart LSP after successful formatting in python buffer --- emacs/init.org | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/emacs/init.org b/emacs/init.org index 8d9125b..012c08e 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -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