feat: emacs - save buffers when they lose focus

This commit is contained in:
Ryan Yin
2024-01-10 18:30:40 +08:00
parent f166761af7
commit 161fd0db6a
2 changed files with 11 additions and 1 deletions

View File

@@ -168,4 +168,14 @@
(add-hook 'fennel-mode-hook #'turn-off-smartparens-mode)
(add-hook 'hy-mode-hook #'turn-off-smartparens-mode)
;; auto-save
(use-package super-save
:ensure t
:config
(super-save-mode +1)
(setq super-save-auto-save-when-idle t)
(setq auto-save-default nil))
;; save on find-file
(add-to-list 'super-save-hook-triggers 'find-file-hook)

View File

@@ -5,7 +5,7 @@
;; on the command line, then restart Emacs for the changes to take effect -- or
;; use 'M-x doom/reload'.
(package! nerd-icons)
(package! super-save)
(package! rime)
(package! wakatime-mode
:recipe