lazy load recentf-mode and editorconfig-mode
This commit is contained in:
2 files changed
+22
-3
No files matched your search
@@ -52,15 +52,27 @@
|
|||||||
(setq auto-save-file-name-transforms
|
(setq auto-save-file-name-transforms
|
||||||
`((".*" ,temporary-file-directory t)))
|
`((".*" ,temporary-file-directory t)))
|
||||||
|
|
||||||
|
|
||||||
|
(setq creature/recentf-mode-timer
|
||||||
|
(run-with-idle-timer 5 nil #'recentf-mode))
|
||||||
|
|
||||||
|
(add-hook 'find-file-hook #'recentf-mode)
|
||||||
|
|
||||||
(with-eval-after-load 'recentf
|
(with-eval-after-load 'recentf
|
||||||
|
(remove-hook 'find-file-hook #'recentf-mode)
|
||||||
|
(cancel-timer creature/recentf-mode-timer)
|
||||||
|
(makunbound 'creature/recentf-mode-timer)
|
||||||
|
|
||||||
(setq recentf-max-saved-items 1000)
|
(setq recentf-max-saved-items 1000)
|
||||||
;; (add-to-list 'recentf-exclude "bookmarks")
|
;; (add-to-list 'recentf-exclude "bookmarks")
|
||||||
(add-to-list 'recentf-exclude "COMMIT_EDITMSG\\'")
|
(add-to-list 'recentf-exclude "COMMIT_EDITMSG\\'")
|
||||||
(add-to-list 'recentf-exclude "node_modules")
|
(add-to-list 'recentf-exclude "node_modules")
|
||||||
|
(add-to-list 'recentf-exclude "site-lisp")
|
||||||
|
|
||||||
(with-eval-after-load 'package
|
(with-eval-after-load 'package
|
||||||
(add-to-list 'recentf-exclude (expand-file-name package-user-dir))))
|
(add-to-list 'recentf-exclude (expand-file-name package-user-dir))))
|
||||||
|
|
||||||
|
|
||||||
;; Disable bell
|
;; Disable bell
|
||||||
(setq visible-bell nil
|
(setq visible-bell nil
|
||||||
ring-bell-function 'ignore)
|
ring-bell-function 'ignore)
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
;; -*- coding: utf-8; lexical-binding: t; -*-
|
;; -*- coding: utf-8; lexical-binding: t; -*-
|
||||||
|
|
||||||
(require 'editorconfig)
|
(autoload 'editorconfig-mode "editorconfig" "" t)
|
||||||
|
|
||||||
(editorconfig-mode 1)
|
(setq creature/editorconfig-timer
|
||||||
|
(run-with-idle-timer 5 nil #'editorconfig-mode))
|
||||||
|
|
||||||
|
(add-hook 'find-file-hook #'editorconfig-mode)
|
||||||
|
|
||||||
|
(with-eval-after-load 'editorconfig
|
||||||
|
(remove-hook 'find-file-hook #'editorconfig-mode)
|
||||||
|
(cancel-timer creature/editorconfig-timer)
|
||||||
|
(makunbound 'creature/editorconfig-timer))
|
||||||
|
|
||||||
(setq creature/editorconfig-timer nil)
|
|
||||||
|
|
||||||
(provide 'init-editorconfig)
|
(provide 'init-editorconfig)
|
||||||
Reference in new issue
Block a user