You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I work around it by conditionally disabling save on idle if certain modes are enabled. Specifically those involved with formatting-on-save.
(use-package super-save :defert:init
(doom-load-packages-incrementally '(super-save))
:config
(defvar+super-save-disabled-major-modes '()
"Major modes in which super-save on idle is disabled.")
(defvar+super-save-disabled-minor-modes '(apheleia-mode format-all-mode)
"Modes when enabled cause super-save to be disabled.")
(defvar+super-save-auto-disable-idle't"Automatically disable idle based on major and minor modes.")
(defun +super-save-auto-disable-idle ()
"Automatically disable based on major and minor modes."
(not (or (member major-mode +super-save-disabled-major-modes)
;; bound-and-true-p takes a variable, not a symbol
(-some (lambda (elm) (and (boundp elm) elm))
+super-save-disabled-minor-modes))))
(when +super-save-auto-disable-idle
(add-to-list'super-save-predicates#'+super-save-auto-disable-idle))
(setq auto-save-default nil
super-save-auto-save-when-idle t
super-save-idle-duration 30
super-save-remote-files nil
super-save-exclude '(".gpg"))
(super-save-mode +1))
would it be possible for super-save to not trigger save hooks — reserving those for when a file is manually saved?
for my specific use-case, i'm using org-roam which binds:
the db autosync is cpu intensive so there's a periodic bit of a lag when i have
super-save-auto-save-when-idle
turned on (which I would like to keep).is there a way i can adjust the org-roam hook and/or configure super-save to make the two mutually exclusive?
The text was updated successfully, but these errors were encountered: