mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
chore(editor): extract recentf, savehist and uniquify to seperate modules
This commit is contained in:
33
modules/editor/siren-recentf.el
Normal file
33
modules/editor/siren-recentf.el
Normal file
@@ -0,0 +1,33 @@
|
||||
;;; siren-recentf.el --- jimeh's Emacs Siren: recentf configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for recentf.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package recentf
|
||||
:straight (:type built-in)
|
||||
:demand t
|
||||
|
||||
:custom
|
||||
(recentf-save-file (expand-file-name "recentf" siren-cache-dir))
|
||||
(recentf-max-saved-items 5000)
|
||||
(recentf-max-menu-items 1000)
|
||||
(recentf-auto-cleanup 'never)
|
||||
(recentf-exclude '("\\.git.*" "\\.hg.*" "\\.svn.*"))
|
||||
|
||||
:init
|
||||
(defun siren-recentf-exclude-p (file)
|
||||
"A predicate to decide whether to exclude FILE from recentf."
|
||||
(let ((file-dir (file-truename (file-name-directory file))))
|
||||
(-any-p (lambda (dir)
|
||||
(string-prefix-p dir file-dir))
|
||||
(mapcar 'file-truename (list siren-cache-dir package-user-dir)))))
|
||||
|
||||
:config
|
||||
(add-to-list 'recentf-exclude 'siren-recentf-exclude-p)
|
||||
(recentf-mode +1))
|
||||
|
||||
(provide 'siren-recentf)
|
||||
;;; siren-recentf.el ends here
|
||||
21
modules/editor/siren-savehist.el
Normal file
21
modules/editor/siren-savehist.el
Normal file
@@ -0,0 +1,21 @@
|
||||
;;; siren-savehist.el --- jimeh's Emacs Siren: savehist configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for savehist.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package savehist
|
||||
:straight (:type built-in)
|
||||
|
||||
:custom
|
||||
(savehist-additional-variables '(search-ring regexp-search-ring))
|
||||
(savehist-autosave-interval 60)
|
||||
(savehist-file (expand-file-name "savehist" siren-cache-dir))
|
||||
|
||||
:init
|
||||
(savehist-mode +1))
|
||||
|
||||
(provide 'siren-savehist)
|
||||
;;; siren-savehist.el ends here
|
||||
22
modules/editor/siren-uniquify.el
Normal file
22
modules/editor/siren-uniquify.el
Normal file
@@ -0,0 +1,22 @@
|
||||
;;; siren-uniquify.el --- jimeh's Emacs Siren: uniquify configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for uniquify.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package uniquify
|
||||
:straight (:type built-in)
|
||||
:demand t
|
||||
|
||||
:custom
|
||||
(uniquify-buffer-name-style 'post-forward-angle-brackets)
|
||||
(uniquify-separator "/")
|
||||
;; rename after killing uniquified
|
||||
(uniquify-after-kill-buffer-p t)
|
||||
;; don't muck with special buffers
|
||||
(uniquify-ignore-buffers-re "^\\*"))
|
||||
|
||||
(provide 'siren-uniquify)
|
||||
;;; siren-uniquify.el ends here
|
||||
Reference in New Issue
Block a user