From dcaff77c01a3d8bc4daffc7f6d652133ffd00787 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Sun, 28 Aug 2022 21:38:40 +0200 Subject: [PATCH] Emacs: Don't auto-save when focus switches to lsp-mode's signature view --- .config/emacs/config.org | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.config/emacs/config.org b/.config/emacs/config.org index 0912deb..db3a5e5 100644 --- a/.config/emacs/config.org +++ b/.config/emacs/config.org @@ -191,6 +191,14 @@ Install and configure packages. (use-package super-save :config (setq super-save-auto-save-when-idle t) + + ;; Fix for issues: super-save #38 and lsp-mode #1322 + (defun dot/super-save-disable-advice (orig-fun &rest args) + "Dont auto-save under these conditions." + (unless (string= (car args) " *LV*") + (apply orig-fun args))) + (advice-add 'super-save-command-advice :around #'dot/super-save-disable-advice) + (super-save-mode)) #+END_SRC